React Compiler on non-JSX #56
Unanswered
barryam3
asked this question in
General Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To what extent does the React compiler support non-JSX source?
This gets memoized (playground):
This does not (same for the
_jsx
runtime) (playground):However, if I add a hook call, even if unused, then it does (playground):
I'm not actually trying to develop without JSX, but I ran the compiler on some post-transpilation code and was surprised to see some of my components memoized. I'm trying to understand what actually triggers memoization in the compiler.
Beta Was this translation helpful? Give feedback.
All reactions