Currently, I am tackling a rather extensive project and my aim is to divide Vuex
modules into as many segments as feasible. Specifically, I intend to segregate the API
functionality from the UI
, maintaining a clear distinction between server-sourced data and component markers.
While reviewing the documentation (http://vuex.vuejs.org/en/structure.html), it suggests organizing everything into separate modules
, which is quite beneficial. However, confusion arises when there are both a page for 'products' and actual data representing 'products', requiring them to be kept distinct.
Is it viable to accomplish something along these lines:
{
modules: {
api: {
products: // ...
},
pages: {
products: // ...
}
}
}
Furthermore, would accessing them via store.api.products
and store.pages.products
be possible? Am I misunderstanding something here?
Thank you!