pinia
pinia copied to clipboard
feat: add warning message if store id already exists (#1394)
Add a toast message if store with current id already exists.
Deploy Preview for pinia-official canceled.
Name | Link |
---|---|
Latest commit | 9ff53511a4c273055f55b77ffa50057a3efbdbd5 |
Latest deploy log | https://app.netlify.com/sites/pinia-official/deploys/62d699cb585f9c0008823674 |
Thanks but this doesn't do what you think it does 😓 , it doesn't add the feature you linked. Did you try it?
Thanks but this doesn't do what you think it does 😓
Could you please explain how to fix this?
Thanks but this doesn't do what you think it does 😓
Could you please explain how to fix this?
When changing routes in playground, you can see unnecessary warning messages. Pinia registers stores with id
when creating them, reusing stores in other places mean they were registered before with the id
so the warning will come up!
Thanks but this does not implement the linked feature, it warns whenever the store is reused (which we don't want ofc).
We don't know if we will implement the feature yet but if you want to give it another shot make sure to:
- include tests
- make the warning dev only (just a warn, not the toast)