Trying to create a megastore - Reactivity is lost #1031
-
BackgroundI use many small stores, one for each task. One task includes lots of states, getters and actions. When the project is growing I've noticed that I would like to have access to it all through one big object. Therefor I've created a "megastore". megastore.jsThe things I gain with a megastore is:
import { useEdit } from './edit'
import { useCollection } from './collection'
export const megastore = { useEdit, useCollection } Componentimport { megastore } from './megastore'
console.log(megastore) I can successfully access the stores with something like Reactivity is lostWhen changing a state with a click of a button, the template does not react to it. The reactivity is gone. Question
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It does work. I just forgot the |
Beta Was this translation helpful? Give feedback.
It does work. I just forgot the
()
likemegastore.useEdit().loaded
.