Skip to content

How does actions update the store? #1888

Discussion options

You must be logged in to vote

Pinia doesn't do anything special with map. Your map isn't actually doing anything to the array, it just returns the same object. It looks like the assignment to the object variable (object = ) is what is manipulating something in both cases, and that is probably the update you are actually seeing. This is known as a side effect, where the function is updating something outside of it.

Replies: 1 comment

Comment options

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