Currently, I am tackling the pagination aspect of a project that involves handling a large amount of data. My initial instinct was to store this data within Vuex. However, I ended up implementing all the logic in the Vuex store module. Now, my goal is to find a way to reuse this specific module by creating an instance of it. Is it feasible to do so? Or would it be more effective to create a service instead? Perhaps using mixins could also be a potential solution. Ultimately, my priority is to ensure that the data is stored within the store itself.
component1 -> new CommonStoreModule() component2 -> new CommonStoreModule()
I would greatly appreciate your guidance on determining which approach and pattern would be the most suitable for this scenario.