Add an option to disallow direct state modification from component
Author: Aaron-PoolCreated Jan 21, 2020Updated Feb 20, 2026
Labelsdiscussionfeature requestplugins
In the example, I kind of dislike the fact that the component can directly call `cart.state.rawItems = [];`. Just because I think that can encourage people to modify state in a disorganized manner. Can we get a plugin setting that disallows state being modified from the component (rather than an explicit action)?
Source: vuejs/pinia