4 ms·
View = Function(State), the original idea behind React. I use React every day, and I enjoy it, but it hides nightmarish complexity to preserve a semblance of th
by phpnode 5y ago
View = Function(State), the original idea behind React. I use React every day, and I enjoy it, but it hides nightmarish complexity to preserve a semblance of this original, neat and tidy idea.
- mekkkkkk 5y agoHow do you mean that this causes 'nightmarish complexity'? I guess it's true if you measure the amount of complexity that powers the framework, but the visible API's, the resulting project structure and the implementation itself is incredibly simple and versatile. I'd say it's one of my favorite properties of component frameworks as opposed to raw element modification, templating solutions or classical MVC.
- phpnode 5y agoI'm not criticising the idea or the framework, but the react team have had to go to enormous lengths to make that one simple idea work. And the community have had to embrace (and then sometimes, forget) some pretty controversial techniques and concepts in that time, with more big changes coming soon (hello concurrent mode!). It has cost FB tens of millions of dollars to develop. I'm not saying that investment hasn't been worth it, but peek under the hood and the complexity is huge.
- mekkkkkk 5y agoAlright, I agree completely. But I still don't see how it causes the same issues as microservices does. It is definitely conceptual crack (which is a genius term btw), but it isn't an ominous foot gun the same way the allure of microservices is. EDIT: Oh I get it, you aren't talking at all about the consequences for the implementers. Only the massive effort required to turn the alluring V=f(S) into the React we have today. Got it.
- MathCodeLove 5y agoThey didn't say it causes the complexity, just that React hides a lot of complexity away. React is very simple and easy to use on it's surface, but it an incredibly complex collection of software under the hood.
- seanp2k2 5y agoIt's funny, before I knew about React (this was ~2014), I wrote a ~7ksloc webapp with jquery and underscore that also just used memory for state and triggered a re-render of things when inputs changed. I haven't dug into how React works at a deep level lately, but at the time, for my relatively simple thing (basically did a few pivot tables worth of calculations for some financial stuff), it wasn't really that complex. I'm sure that enough engineers working on a framework for a decade can make it very complex, just wondering, as I do with many mature pieces of software, if a ground-up rewrite based on the same concept but knowing what they all know now would look drastically different from the latest dev build.