Our approach involves server-side rendering with the use of preserveState
to persist all vuex modules' state when navigating between pages.
However, we have a specific store where we need to exclude certain properties from persistence. Is there a solution within Vuex to achieve this? For example:
@Module({ namespaced: true, dynamic: true, store, name, preserveState: true })
class SampleModule extends VuexModule {
propertyOne: {}; // intended for persistence
propertyTwo: {}; // intended for persistence
propertyThree: {}; // not meant to be persisted
propertyThree: {}; // not meant to be persisted
}
Currently, our only idea is to create a separate store specifically for those non-persistent properties. However, this solution is less than ideal since these properties are closely related and differ only in their persistence requirements.
Are there better alternatives or methods to handle this situation more efficiently?