6 ms·
Are you asking on reddit (or some other site that is structured to pass quick thoughts on a subject)? Are you giving no more information on your questions than
by wstuartcl 8y ago
Are you asking on reddit (or some other site that is structured to pass quick thoughts on a subject)? Are you giving no more information on your questions than - OP: I have an issue with SEO in my current Vue project how can I do this?
- Community: Have you tried nuxt?
Context and details are important on both sides of the fence, Explain enough about your apps architecture and reasoning to convey that you have considered other structures before you expect to get answers that take more time than simply pointing you down a path that resolves your issue without any details.
Pointing you to NUXT is equivalent of a longer sentence: "You don't tell us what you have tried or considered, what your application architecture is or what problems you have run into based on your previous design decisions -- therefore we recommend using something like NUXT which has boilerplate design decisions baked in that resolve your issues."
- OP: I have two components, I want to share data, how can I do?
- Community: Have you tried vuex?
This seems perfectly reasonable to me, vuex, while being one option for sharing data/state between components is IMHO almost always the best option for doing so. It has a little more boilerplate than event bus or data reference passing, but for almost every non-trival need I have come across vuex has been a better choice. So much so that I have found myself reworking to modular vuex stores in _every_ circumstance where I have used event bus or other slight of hand to accommodate shared data/state (hoping to avoid the setup work of vuex).