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
What would be the way to define repos of the same models multiple times, so the different workspaces has different repo tree?
In pinia, we can define multiple instance of the same store like:
export const useProductStore = (productId: number) =>
defineStore(`product-${productId}`, () => {
console.log('create product store for ' + productId);
};
})();
Where do you think it is the best to add the logic to fetch items for the selected workspace and set it? Adding a property to each seems not the best, but maybe it is. Also it will raise some other issues when I want to refresh by api etc
Edit:
Just found the namespace option, can it be dynamic?
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
-
What would be the way to define repos of the same models multiple times, so the different workspaces has different repo tree?
In pinia, we can define multiple instance of the same store like:
Where do you think it is the best to add the logic to fetch items for the selected workspace and set it? Adding a property to each seems not the best, but maybe it is. Also it will raise some other issues when I want to refresh by api etc
Edit:
Just found the namespace option, can it be dynamic?
Beta Was this translation helpful? Give feedback.
All reactions