Request for MapWritableState nested object access.
Author: davidboom95Created Aug 28, 2021Updated Aug 28, 2023
Labelsdiscussionfeature request
What problem is this solving
Modifying deeply nested properties in the state.
Proposed solution
// Object
...mapWritableState(useStore, {
myCity: 'form.address.city',
})
// Array ( outputs the latest key as the variable name, in this case city)
...mapWritableState(useStore, ['form.address.city'])Source: vuejs/pinia