Skip to content

First time using a store causes (wasteful?) re-render #1023

Discussion options

You must be logged in to vote

After looking at the Pinia source code, I think the issue comes fom Devtools being open. If Devtools is not open, the component is not rendered twice. See this plugin.ts code, which triggers an update inside a method explicitly called "addStoreToDevtools".

Sorry for the confusion. Hopefully this info will benefit someone in the future, or lead to a small caveat in the docs about the side effects of having Devtools open.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@mgussekloo
Comment options

@posva
Comment options

posva Feb 3, 2022
Maintainer

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mgussekloo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants