This provides reactive app state through a Pinia store and persists preferences to the browser's local storage.
The implementation is a bit of a hack because I couldn't get the state props to be reactive and persisted to local storage under a universal rendering scheme (i.e., with SSR turned on). However, I provide an alternative implementation that may work if Pinia comes to support SSR better. To watch for upstream enhancements, see https://github.com/vuejs/pinia/issues/829.
This provides reactive app state through a Pinia store and persists preferences to the browser's local storage.
The implementation is a bit of a hack because I couldn't get the state props to be reactive and persisted to local storage under a universal rendering scheme (i.e., with SSR turned on). However, I provide an alternative implementation that may work if Pinia comes to support SSR better. To watch for upstream enhancements, see https://github.com/vuejs/pinia/issues/829.