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
Don't you thought of named Stores like named Routes?
You have just maybe 3-5 similar entities that uses same stores but some internal options that changes inside options within name change and you need to setup them one for one, why not just create some store like
export const useNamedStore = defineNamedStore('namedstore', 'myneedednameorparam', {...options});
and use it like
const myNamedStore = useNamedStore('myneedednameorparam');
maybe with some internal access to this "nameorparam" inside
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Don't you thought of named Stores like named Routes?
You have just maybe 3-5 similar entities that uses same stores but some internal options that changes inside options within name change and you need to setup them one for one, why not just create some store like
export const useNamedStore = defineNamedStore('namedstore', 'myneedednameorparam', {...options});
and use it like
const myNamedStore = useNamedStore('myneedednameorparam');
maybe with some internal access to this "nameorparam" inside
Beta Was this translation helpful? Give feedback.
All reactions