Eduardo San Martin Morote

Results 867 comments of Eduardo San Martin Morote

> I wasn't requesting to disallow direct state mutation in actions Yes, of course, disallowing it in actions would make my response nonsense 😆

Opened https://github.com/posva/pinia/pull/493 to try to get more feedback

@jmroon use a new discussion for that question, please

This might be a caveat that cannot be worked around except by using a `flush: 'sync'` `$subscribe()` because currently, in the code, when calling `$patch` there is ```ts nextTick().then(() =>...

Because otherwise `$patch` would trigger subscriptions twice and using something like `toRaw()` to pause tracking would also remove some unwrapping. Using `$patch` always trigger subscriptions in a sync fashion because...

Maybe this can be fixed but it does require some extra logic because any subscription that happens inside a plugin should not be transferred. There could be other cases of...

Thanks but this doesn't do what you think it does 😓 , it doesn't add the feature you linked. Did you try it?

Thanks but this does not implement the linked feature, it warns whenever the store is reused (which we don't want ofc). We don't know if we will implement the feature...

This example could be useful for a cookbook entry

Thanks for the PR but this completely changes the behavior of plugins. The fix should be possible with minimal changes and without changing how stores are initialized