Hacker News new | past | comments | ask | show | jobs | submit login

I can't imagine writing a real-world Vue app without Vuex. As such, I can't help feeling like this article, despite the best of intentions, is probably misrepresenting things. The last several Vue apps I've written have not used `emit`; not one single time. (context: `emit` is shown/used in this article)



Well, not even Vuex is needed for that matter. It's funny that the author goes out of their way to comment on how you can mutate state directly in Vue, then doesn't take advantage of that.

Both components can share a single "plain old javascript" model object, which they just both freely update. The TodoListItem doesn't need to notify its parent of anything. In a small scale app, it's fine.


I agree, generally, that most apps eventually need it, and that this isn't the best representation of real-world vue, but there are also plenty of lightweight use cases for vue that do not require a vuex store, or even emit. if the linked comparison did use vuex, it would then suffer from a lack of redux on the react side of things, too.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: