7 ms·
That's super interesting. I dont think React is the end state; it has a couple warts that are solved in research communities. TLDR React is not efficient enoug
by dustingetz 9y ago
That's super interesting. I dont think React is the end state; it has a couple warts that are solved in research communities.
TLDR React is not efficient enough, the performance requirements of next-gen apps of 2020s is going to break React because rendering is not incremental. These warts are basically places where React departs from pure functional programming to achieve ease of use.
1) Fundamental performance problem in render-tree-pruning (it is not truly reactive, it does more work than necessary). This is not an issue today except in the most sophisticated apps, but in apps of the 2020s it's going to be a huge problem. My startup http://hyperfiddle.net/ http://hyperfiddle.net/ spends a great deal of energy trying to make React faster, it all boils down to forceUpdate which breaks the "functional programming" philosophy and makes the programming model significantly worse.
2) The solution to (1) is a reactive, spreadsheet-like programming model that generalizes to more than just the View-as-a-function, but also to the rest of the functions. React's solution injects fat "Component" instances everywhere in the view; its not actually just functions, so it breaks for the other expensive computations in the app, which will also need to be optimized in the 2020s.
https://github.com/slamdata/purescript-halogen https://github.com/slamdata/purescript-halogen is the best shot i know of at solving all this; it may be 5 more years yet until this is simplified enough to become mainstream, but all-in-all the ever increasing complexity of apps means truly efficient rendering is inevitable, and React is not that.
- Vinnl 9y agoWhat makes you think 2020 apps are going to be significantly different from 2018 apps? Main difference I can think of is VR and WebAssembly, but the former is not likely to completely change the majority of websites in two years, and the latter is not restrained by React anyway.
- dustingetz 9y ago"2020s" e.g. 2028 Apps are like moores law; every 1.5 years the sophistication doubles.
- dwaltrip 9y agoDoes React with Mobx count as incremental? It only re-renders components when the data accessed by that component has changed.
- dustingetz 9y agoThat's "reactive"