Since day one when I called for your help to test JSX v4, many feedbacks and issues helps to make a more concrete implementation and to fix it. I’d like to express my gratitude to all. We are ready for the third round of tests. We published the RC.3 version of compiler and React bindings to npm.
- rescript@10.1.0-rc.3
- @rescript/react@0.11.0-rc.3
You can install rescript@next
and @rescript/react@next
. Any issues or feedbacks are welcome.
You can activate the JSX v4 with below configuration:
-
Remove the old configuration:
"reason": { "react": 3 }
-
New configuration:
"jsx": { "version": 4, "mode": "classic" or "automatic" }
"automatic"
is for the new jsx tranform APIjsx
-
If you want to keep using v3 with latest compiler and
@rescript/react
:"jsx": { "version": 3, "v3-dependencies": [ "rescript-relay" ] }, "bsc-flags": [ "-open ReactV3" ]
To build certain dependencies in V3 compatibility mode, whatever the version used in the root project, use
"v3-dependencies"
, except@rescript/react