4 ms·
Vue is easily the more complicated of the two. React is basically a very, very minimal foundation for generating a DOM. Vue is like React but with a lot more ba
by IceDane 5y ago
Vue is easily the more complicated of the two. React is basically a very, very minimal foundation for generating a DOM. Vue is like React but with a lot more batteries included.. and much worse abstractions, much worse ecosystem, worse tooling and at least IME, worse performance and harder to optimize.
React is basically: JSX, useEffect, useState(plus a couple more) and reconciliation. React is the result of a group of very talented people spending a lot of time thinking about what the core of a framework like this should be. There is a very good reason react doesn't have more bells and whistles, because it's basically at a local minimum(in terms of complexity). What we have are tiny, simple foundational building blocks from which we can build larger and more complicated abstractions. There is nothing else in this space that is as simple: Angular and Vue are both basically "react with more bells and whistles", and sveltejs requires an entire compiler and has its own share of problems.
- wruza 5y agoThere is. Mithril.js is much simpler than React, doesn’t reinvent wheels (onChange et al), loads faster, uses the same rendering method, is state-management agnostic, and integrates well with anything else. You seem like being sort of short-sighted by React hype against jQuery. Mithril is the core of immediate mode rendering reconciliated into DOM. React is too, but only in a sense, iff you use it’s preact version to undo synthetic events and skip its own state routines. To save you an hour or so of reading its guide, the only key difference between Mithril and React is how VDOM updates are handled. Mithril always renders the entire “v-screen” on any vnode-related event out of an assumption that it changed something and DOM shouldn’t be too large in its div size. You can take it down with e.g. heavy svgs, but that is also true for vue, react, whatever. No framework can compare tens of thousands of vdoms efficiently, it’s always >= O(n). These cases are handled by mounting sub-apps at these points, so that redraws don’t descend and events don’t bubble up. React also advises against that and suggests “windowing”, also a very fresh and interesting approach (for those of course who still aren’t aware that it’s called a scroll view controller and is the core of all desktop ui frameworks since circa 1990).