You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why loading the data into core/pages is not optimal solution? Because it breaks the SRP principle - when You like to add your let's say ProductDetails component to other page You need to somehow duplicate the data fetching logic. Of course, we can move the more-sophisticated data fetching logic solely to Vuex actions to simplify the Components logic as a first step
Somehow related to:
nuxt/nuxt#32 (comment)
https://nuxtjs.org/faq/async-data-components/
Why loading the data into core/pages is not optimal solution? Because it breaks the SRP principle - when You like to add your let's say
ProductDetails
component to other page You need to somehow duplicate the data fetching logic. Of course, we can move the more-sophisticated data fetching logic solely to Vuex actions to simplify the Components logic as a first stepWe need to modify:
https://github.com/DivanteLtd/vue-storefront/blob/9be57858de241ab7f0d39b999cedae137fb0b40b/core/client-entry.js#L27
To support not only
mixins
but alsocomponents
. This will allow us to refactor thecore/pages
to more granular components like:ProductDetails
etc.The sub-components could be more self-sufficient then and take the responsibility for it's own state management - but not only!
Open questions:
this
)?Roadmap:
fetchData
logick to Vuex actioncore/pages/Product
andcore/pages/Category
using these componentsThe text was updated successfully, but these errors were encountered: