This repository was archived by the owner on Nov 28, 2020. It is now read-only.
Review dependencies and examples, make Vuex more explicit with TypeScript #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
The Vuex Mutations, Actions and Getters looks like they’ve been done in a hurry.
Also, lots of getters are hard-coded in the components directly.
I feel this project is about a "reference usage example" on how to use Nuxt.js with TypeScript.
Let's rework the Vuex modules.
There aren't much properly shown examples of Nuxt with TypeScript checked Vuex modules.
Maybe we need something similar to what's shown in this StackOverflow question (using championswimmer/vuex-module-decorators, codesandbox) or maybe we don't need. It looks like docs example about using TypeScript for vuex nuxtjs.org/examples/typescript-vuex
Summary
@nuxtjs/axios
@nuxtjs/axios
to useNUXT_ENV_...
environment variable to flip which API endpoint to call.vscode/settings.json
, add{"typescript.tsdk": "node_modules/typescript/lib"}
nuxt.config.js
Next (?)
Review
Make sure we can run the following properly, without errors:
mode: "spa"
, afternuxt build
, andnuxt start
mode: "universal"
, afternuxt build
, andnuxt start