4 ms·
I'd hoped this release would have added a compiler and drastically simplified the syntax to something close to a modern framework. I know React is eventually go
by nailer 2y ago
I'd hoped this release would have added a compiler and drastically simplified the syntax to something close to a modern framework. I know React is eventually going to do that, but it feels like React has been drowning in overly complex DX for at least the last 5 years.
- acemarke 2y agoThe React Compiler is currently in beta: https://react.dev/blog/2024/10/21/react-compiler-beta-release https://react.dev/blog/2024/10/21/react-compiler-beta-releas... That said, it doesn't change the APIs included in React itself, or the overall usage patterns. Ultimately it rewrites your component code to add a lot of conditional comparisons to see if props or state values changed, and uses that to trigger React's existing rendering optimization behaviors. Long-term, I expect that the React Compiler _will_ result in a significant change in the DX for using React. React's default behavior has always been "re-render recursively regardless of props changes" [0], but people often assume it's "only re-render the child if the props changed". React Compiler actually makes flips React's default behavior to make that a reality. [0] https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-mostly-complete-guide-to-react-rendering-behavior/#standard-render-behavior https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-...