News for hackers. Stuff that matters.
Re:How we do Vue: one year later (2017) by codegeek on Monday March 18, 2019 @06:57PM (#19426205)
Curious how do you deal with state management in large application if you are only using small bits of vuex. I am writing this vue application where one component has become so huge that I would like to break it into smaller components but then passing data around in props is a nightmare. So I then need to look into something like vuex. So how do you get away from that in a large app ?
Re:How we do Vue: one year later (2017) by Townley on Monday March 18, 2019 @07:02PM (#19426239)
It depends a lot on what you're hoping to do. There's a happy medium for a large app between "every component manages their own state/props and those of their children" and "every component is a stateless vessel for VueX data".

I think if you're at the point where "passing data around in props is a nightmare" that's the pain point that VueX is meant to resolve, and it should feed into the solution. But following the principle of "components should manage their state without VueX if it's easy/convenient for them to do so" is a good way to avoid the global state becoming too unwieldy.

Re:How we do Vue: one year later (2017) by keyle on Monday March 18, 2019 @08:00PM (#19426635)
That's a problem you'll have with any of those frameworks. Personally I have endpoints that ask for the data at a component level and if they're small, they're being passed the data from the view that contains them.
Re:How we do Vue: one year later (2017) by jaxn on Monday March 18, 2019 @09:29PM (#19427256)
If you use GraphQL, then Apollo and it's local cache are a pretty amazing alternative to VueX
Re:How we do Vue: one year later (2017) by Smithalicious on Tuesday March 19, 2019 @05:04AM (#19429172)
What exactly is your issue with props?