cylc / cylc-ui

Web app for monitoring and controlling Cylc workflows

Home Page:https://cylc.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use the `useLocalStorage` composable from VueUse for reactive localStorage binding

MetRonnie opened this issue · comments

https://vueuse.org/core/useLocalStorage/

We use localStorage for saving user preferences. However it is not reactive so we have to jump through some hoops such as duplicating values in the Vuex store which is reactive.

Using this composable looks like it will simplify our usage of localStorage. However it also adds a new dependency, though this might not be much of a problem due to tree-shaking.