Understanding React Compiler
React Compiler & Memoization
- Many are unclear how the compiler changes day‑to‑day development: Will
React.memo,useMemo,useCallbacklargely disappear, or still be needed in edge cases? - One view: compiler will automatically handle memoization and dependency tracking, reducing boilerplate and common bugs (especially mis-specified dependency arrays).
- Others question whether its optimizations overlap with what JS engines (e.g., V8) should already do, and whether new complexity and compilation steps are worth it.
- Concern that source transformations will complicate debugging because compiled output may not map cleanly back to original code.
Hooks, Suspense, and React’s Design
- Hooks are seen by some as the start of React’s decline: brittle rules (must be called in same order, not in conditionals), “magic” behavior, and heavy cognitive load.
- Others argue hooks are a powerful composition mechanism and a reasonable DSL for state and lifecycle, especially with good lint rules.
- Suspense and React’s custom async model are criticized for not using language features like async/await or generators more directly; others note server components already rely on async/await.
JSX: Language, Semantics, Alternatives
- JSX spec is documented but not standardized by TC39. Multiple implementations exist (Babel, TypeScript, esbuild).
- JSX defines syntax but not semantics; the runtime meaning is framework-specific.
- Debate over whether JSX is a “bizarre hack” versus a pragmatic syntax improvement. Alternatives mentioned: template literals (Lit), hyperscript, plain
createElement, CoffeeScript, or TSX without React. - Some confusion about JSX “rendering XHTML”; others clarify JSX just compiles to function calls, not markup.
React vs Other Frameworks / Ecosystem
- Strong disagreement on React’s current value:
- Critics: bloated, over-engineered, requires heavy toolchains, large bundles, and constant workarounds for state and effects; better options include Svelte, Solid, Vue, Lit, HTMX, server-rendered stacks.
- Defenders: still the de facto standard with unmatched ecosystem, reasonable trade-offs, and now “catching up” with compiler-based optimizations like other modern frameworks.
- Several note that alternatives often provide smaller, faster bundles (e.g., Svelte) or leverage Web Components (Lit), but may lack React’s ecosystem.
Careers, Fundamentals, and Learning Path
- Strong theme: learn JavaScript, HTML, and CSS fundamentals first; frameworks are interchangeable if you know the basics.
- Some argue juniors must still learn React for employability; others advise avoiding it on technical grounds even if that limits job options.
- General agreement that deep understanding of fundamentals and of how tools work under the hood is crucial for debugging and long-term skill.