If you are building your own custom bundle, you’d need to find the global configuration module that sets the JSX mode in the jscomp/ folder and modify the playground jsoo file to set the configuration flag on initialization.
Perhaps the question is why the website’s source code is on JSX 3 and not JSX4. (Or perhaps this is just another question).
It should be easy to switch, assuming updating react to 18 has no consequences (nextjs and whatnot).
I apologize for not being clear. I am hacking on the ReactPlayground code itself. In particular, I am adding a “file-tree” to the left hand side of the CodeMirror editor, so it looks like an IDE.
Now, I’d prefer to do everything using latest JSX, but when I modify bsconfig.json from JSX3 to JSX4 for the existing ReactPlayground, it fails to compile.
I am wondering if there were any plans to update this in the near future.
However, the examples on the Rescript lang website for section “Rescript & React” all appear to use JSX4 – Introduction | React – so why is React 18 a problem ?
Oh, is the problem latest Next does not support React 18, so if I want JSX4, I need to rip out the code that depends on Next ? (I think I already that by accident, it was pulling in some bloom-filter / crypto code I could not add, so I ripped out Next already).
Exactly. Newer NextJS versions support React 18, so you’d just need to upgrade to the latest NextJS version and then use the latest rescript-react bindings.