Having difficulty updating a property in an object stored in localStorage using the useStorage
function.
Inside the App.vue
file:
routeStore.query = {
tab: 'products',
subTab: 1,
search: '',
article: '',
}
console.log(routeStore.query)
console.log(localStorage.query)
useStorage('query', routeStore.query)
console.log(localStorage.query)
console
:
Proxy(Object) {tab: 'products', subTab: 1, search: '', article: ''}
{"tab":"products","subTab":2,"search":"","article":""}
{"tab":"products","subTab":2,"search":"","article":""}
Trying to ensure that query.subTab
remains as 1
. Any advice on the correct approach to achieve this?