How to use React suspense with react_on_rails gem

i’m trying to use the experimental version of react to use suspense for data fetching etc…
I installed react experimental version fine via npm.
However, part of the install process says to change this:

ReactDOM.render(
<React.StrictMode>

</React.StrictMode>,
document.getElementById(“root”)
);

to this:

ReactDOM.unstable_createRoot(document.getElementById(“root”)).render(
<React.StrictMode>

</React.StrictMode>
);

But with react on rails it works different.
How can i enable react experimental mode to be able to use React.suspense

Thanks for any help…

@ziploker Very interesting!

We might need a PR to support this.

Can you please:

  1. Share the documentation link
  2. Create a Github Issue for this
  3. Join our Slack for React plus Rails

I created a github issue and linked the docs.

thank you!