3 ms·
React's shouldComponentUpdate hook seems to be a bit of after thought and a bit of relatively complex over engineering. A comparison of mithril can see that Re
by lowwave 6y ago
React's shouldComponentUpdate hook seems to be a bit of after thought and a bit of relatively complex over engineering.
A comparison of mithril can see that React is almost 2 times as slow.
https://mithril.js.org/framework-comparison.html https://mithril.js.org/framework-comparison.html
The only reason to use React for SPA is the job market, and that companies like the fact that is backed by Facebook.
- jsf01 6y agoReact is far greater than 2x as slow on some metrics, like boot time, but the newer versions actually aren’t as bad as the pre-fiber versions that those benchmarks are based on for DOM updates. For boot up time React is still about 5x worse than Mithril, but on create & update benchmarks they’re now at least in the same ballpark. https://krausest.github.io/js-framework-benchmark/current.html https://krausest.github.io/js-framework-benchmark/current.ht...
- azangru 6y agoNit: shouldComponentUpdate is a lifecycle method, not a hook. The corresponding approach in React's new world is React.memo.