Course lesson
Mutate Application State Properties Directly with Pinia’s storeToRefs()
Instead of calling an action function to change the state, we can choose to change it directly by importing the attributes from our store. In order to not loose reactivity while destructuring properties we can use storeToRefs() function.
- Duration
- 2 min
- Access
- Included
- Transcript
- Retained from source evidence
Instead of calling an action function to change the state, we can choose to change it directly by importing the attributes from our store. In order to not loose reactivity while destructuring properties we can use storeToRefs() function.