3 ms·
I think both React and Vue become difficult when working with complicated UIs. If you're already using Vue or React, these simple articles are not comprehensive
by NathanCH 8y ago
I think both React and Vue become difficult when working with complicated UIs. If you're already using Vue or React, these simple articles are not comprehensive enough to be convincing.
React and Vue basically manage state the same way, which is 90% of what you'll be doing in these libraries.
And just like in React, default state management is insufficient in Vue.
- orangecat 8y agoAnd just like in React, default state management is insufficient in Vue. That hasn't been my experience at all. The medium-sized app I worked on used what is apparently called the "store pattern": a state class with data and methods that mutate it, and components that read the data but only update it by calling its methods. This provides the major benefits of Redux ("functional" components whose only state is purely local) with much less complexity.
- littlecranky67 8y agoRedux is only a little more work/complexity than the "singleton state class" approach but brings a lot more benefits: timetraveling debugger, serialization of the state (i.e. to localStorage to allow multi-tab operation or resume after tab was closed) and separation of pure HTML/Visual Components versus Container components. Oftentimes beginner would create just a single React component that references the state - which immediately couples the visual parts of your Application to your data, making it harder to introduce automated testing later on. When using the smart/dumb pattern together with react-redux it is very straightforward to come out with a good architecture, that does not mix ui and business logic/data handling.