Hacker News new | ask | show | jobs
by wg0 86 days ago
You can now use React Compiler and there would be no virtual DOM.

Already being used in production at large code bases.

5 comments

The React Compiler does not remove the virtual DOM. You literally cannot use React without a virtual DOM.
You can and you can't. There's still plenty of very popular libraries that don't behave correctly with it. That's more on the libraries than on the compiler but that's the current state of things.
I genuinely don't know what lead to the compilers when we already had a simpler concept of signals.
React Compiler(originally react-forget) is a build-time tool that automatically optimizes your React app by automatically memoizing your code. It only replaces the manual ceremony of useMemo, useCallback, and React.memo with automatic caching at compile time. So, it's fixing the problem they introduced by React itself or you we can call it a "trade-off" in a sense
Yeah afaik React Compiler doesn't really replace virtual DOM.