Skip to content

Plugin function is executed every time useStore() is called? #678

Discussion options

You must be logged in to vote

Thanks @posva for the reply. I love your work.
I am using version ^2.0.0-rc.6 .

In the plugin function itself when there is a useStore() call, the function would execute again,
probably because Pinia did not register the plugin yet due to the first call is not finished yet.

This leads to infinity loop.
My situation is very very niche, and fortunately the workaround is very simple, I added a flag check at the top of the function.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@go-web-dev-my
Comment options

Answer selected by go-web-dev-my
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants