Skip to content

Commit

Permalink
perf: support the use of store in the global scope of createapp
Browse files Browse the repository at this point in the history
Previously only allowed to run in the setup function
  • Loading branch information
Linkontoask committed Jan 6, 2021
1 parent b727a0b commit 7fadbeb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hooks/hook.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useStore } from 'vuex'
import { on, off } from '@/utils/index'
import store from '@/store/index'

interface InternalHook {
startInternal: () => void
Expand Down Expand Up @@ -122,8 +123,6 @@ export function uesModuleStore<
A = string,
M = string
>(NAMESPACED: string) {
const store = useStore()

const useState = (): S => {
return store.state[NAMESPACED]
}
Expand Down

0 comments on commit 7fadbeb

Please sign in to comment.