You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the only way to use the store using the composition API is by creating a store with useStore. Using modules this way, results in messier code than it should be. I would like to introduce a useModule hook, which will export commit, dispatch, getters and state the same way as useStore does.
What problem does this feature solve?
Currently, the only way to use the store using the composition API is by creating a store with
useStore
. Using modules this way, results in messier code than it should be. I would like to introduce auseModule
hook, which will exportcommit
,dispatch
,getters
andstate
the same way asuseStore
does.What does the proposed API look like?
Basic example
Current situation
Proposed situation:
Multiple store modules with nested modules
Current situation:
Proposed situation:
The text was updated successfully, but these errors were encountered: