3 ms·
> React has a lot less going on. I don't think that's quite true anymore. As someone sarcastically remarked on Twitter [0], React has patched native events wit
by azangru 3y ago
> React has a lot less going on.
I don't think that's quite true anymore. As someone sarcastically remarked on Twitter [0], React has patched native events with synthetic events; has rolled out its own scheduler in order to achieve the suspense effect ("patched the event loop"), and is going to patch the native fetch for reasons that I am not clear about, but that are doubtless also suspense-related. With hooks, it introduced a syntax with a set of implicit conventions that, confusingly, still looks like javascript, but has significant differences from how javascript works ("the rules of hooks"). React provides its own way of lazy-loading modules; its new server-side renderer currently assumes that when React rehydrates, it takes control of the whole DOM tree; and the docs are now strongly recommending people to use full-fledged frameworks (Next, Remix) when starting new projects. React has long outgrown its "it's just a library" stage, sadly.
[0] - https://twitter.com/RogersKonnor/status/1618739256775815168 https://twitter.com/RogersKonnor/status/1618739256775815168
- mablopoule 3y agoYeah, the most WTF thing I've seen React do is to mess with console.log by silencing them (WTF #1), which was particularly appalling since React did it only because it run the rendering twice under StrictMode (WTF #2), and only during development so you're not sure what the real behavior will be until you run it on production mode (WTF #3). Messing with the console is such a no-go that I'm appalled it even passed the drawing board, making the "React isn't a framework, it's a library" argument even more bonkers than it already is.
- azangru 3y agoOh, I totally forgot how mad I am at React because, with the new hooks-based approach, it has removed the semantic of "do this side effect just once when a component mounts". Mounting a component is such a crucial part of the life cycle of any web component that I am amazed that the React team does not have a special way of handling this; or that with their new architecture they are not guaranteeing how many mount-unmount cycles a component will go through. This all makes me want to move on to web components; but of course now the project that I am a developer on is locked in React :-(
- steve_adams_86 3y agoCertainly, I don't think React is a trivial library. It's an absolute beast given its narrow scope of application. I suppose my point was that React's narrower scope means it's easier to keep a stable API compared to Angular which has a much broader scope. But maybe you weren't suggesting that's incorrect, and just wanted to point out that React is a rat's nest now (which is totally fair, haha).