Is there a way to add a useStore hook to get the injected store attached to vue root?
I know that same can be accessed via ctx.root.$store, but if you've dabbled with the composition enough you know sometimes hooks get far away from Vue instance (a hook calling a hook calling a hook) and we want to avoid param soup only to call store under the 5th hook called
For a different reason we don't want to import store directly as we're sharing modules between apps with lerna, so store instance can be different with each use
Is there a way to add a useStore hook to get the injected store attached to vue root?
I know that same can be accessed via
ctx.root.$store
, but if you've dabbled with the composition enough you know sometimes hooks get far away from Vue instance (a hook calling a hook calling a hook) and we want to avoid param soup only to call store under the 5th hook calledFor a different reason we don't want to import store directly as we're sharing modules between apps with lerna, so store instance can be different with each use
not sure if it's possible for vuex v3