4 ms·
React is easy when you just do data -> rendering. But what about animations, modals and other forms of interactivity that doesn't fit squarely into this? And w
by maaaats 9y ago
React is easy when you just do data -> rendering. But what about animations, modals and other forms of interactivity that doesn't fit squarely into this?
And while React is simple, you quickly have to add a router, some state management etc., so instead of a small simple library most React-projects I have seen end up being a custom framework.
- BigJono 9y agoReact has perfectly fine state management out of the box, and a "router" is about 20 lines of code for most people's use cases.
- brlewis 9y agoIf needing more libs for projects is your issue with React you should try Mithril. Routing is included. There's nothing really magical about state management; plain old JS objects work for 90% of state management, and Mithril streams fill in the rest. Re. animations, etc., those aren't too hard with lifecycle methods, which, if I understand correctly, Mithril copied from React.
- mlsarecmg 9y agoNone of these things come with Vue out of the box. The only difference is, React has often many solutions and massive community support to chip away at something until the very best stand-out solution emerges: redux, react-router, next, etc. React encourages this by staying out. Usually it then trickles down into other eco systems (vuex, vue-router, nuxt, element, ...). If something is very stable or close to perfect it's going to be made official, like modals: Modals: https://reactjs.org/docs/portals.html https://reactjs.org/docs/portals.html Or animations (in react-native at least, but if you click the link you'll see it works for the web just as well): https://www.webpackbin.com/bins/-KfKys3S2mgEH9UsE8GL https://www.webpackbin.com/bins/-KfKys3S2mgEH9UsE8GL In Vue you're pretty much in the rain. The community isn't encouraged to explore due to half-baked-in solutions, and baked in stuff in general is browser-complacent and thereby very limited. So you get css class animation groups (=react-animation-group), state is a one trick pony tied to the lib, theming isn't considered. There are so many open gaps and holes in the eco system at large, i'm scratching my head over how this would possibly be a plus or easier to the developer. It is often not.