vuejs / pinia

🍍 Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support
https://pinia.vuejs.org
MIT License
12.91k stars 1.02k forks source link

When I defineStore, if I use the same id as another Store, the data is not rendered to the page and no error is reported in the console. #2597

Closed hktcodingnow closed 6 months ago

hktcodingnow commented 6 months ago

Reproduction

When I define the same id as other stores in the store defineStore, the data is not rendered to the page and there is no error message in the console.

Steps to reproduce the bug

image I'm using the Pinia persistence plugin, and I've defined a store with an id of Data in another store's js, and this is causing the page data to not be rendered. 屏幕截图 2024-03-05 212433 When I changed the id to a unique id, the problem was solved. image image

Expected behavior

I'd like to be able to get relative bug feedback in the console when I run into a similar problem, rather than no error message at all, which is detrimental to my development.

Actual behavior

When I defineStore, if I use the same id as another Store, the data is not rendered to the page and no error is reported in the console.I'd like to be able to get relative bug feedback in the console when I run into a similar problem, rather than no error message at all, which is detrimental to my development.

Additional information

No response

posva commented 6 months ago

Duplicate of #1394