Skip to content

Best practice for updating Pinia state? #1264

Closed Answered by posva
brandonleichty asked this question in Help and Questions

You must be logged in to vote

It was rather a pattern than a best practice.

In pinia you don’t create an action to just change the state. You can use $patch to directly change the state. You can directly change the state in components as well.

Replies: 5 comments 11 replies

You must be logged in to vote
5 replies
@antoniogiroz

@js-writer

@antlionguard

@js-writer

@Made-of-Clay

Answer selected by brandonleichty

You must be logged in to vote
2 replies
@SchDen

@Made-of-Clay

You must be logged in to vote
1 reply
@Made-of-Clay

You must be logged in to vote
1 reply
@Made-of-Clay

You must be logged in to vote
2 replies
@Made-of-Clay

@q-rault

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet