vuex#createStore TypeScript Examples
The following examples show how to use
vuex#createStore.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.ts From vueconf-london with MIT License | 6 votes |
store = createStore<State>({
state: () => {
return {
todos: [],
filter: "all",
nextId: 0,
} as State
},
mutations,
getters,
actions,
})
Example #2
Source File: index.ts From vue3-ts-base with MIT License | 6 votes |
store: Store<StateType> = createStore({
strict: true,
mutations,
actions: {},
modules: { ...modules },
plugins:
process.env.NODE_ENV !== 'production'
? [
createLogger(),
createPersistedState({
paths: ['app', 'console', 'user']
})
]
: [
createPersistedState({
paths: ['app', 'console', 'user']
})
]
})
Example #3
Source File: index.ts From LiveAtlas with Apache License 2.0 | 5 votes |
store = createStore({
state,
mutations,
getters,
actions,
// plugins: [createLogger()],
})
Example #4
Source File: index.ts From Vue3-Vite-Vuetify3-Typescript-Template with MIT License | 5 votes |
store = createStore<storeTypes>({ modules: { AuthStore, }, })
Example #5
Source File: index.ts From vue3-cesium-typescript-start-up-template with MIT License | 5 votes |
store = createStore<RootState>({ modules: { template, jtCesiumVue, }, })