Docs / rescript-react / Migrate from ReasonReact

Migrate from ReasonReact

ReScript-React is mostly feature-compatible with ReasonReact, with a few long deprecated modules now removed:

  • ReactEventRe: use ReactEvent.

  • ReactDOMServerRe: use ReactDOMServer.

  • ReactDOMRe: use ReactDOM.

  • ReasonReact: use React.

  • ReasonReactCompat fully removed. Was used to migrate to ReasonReact 0.7.0.

Reminder: for ReactDOMRe.renderToElementWithClassName and ReactDOMRe.renderToElementWithId, use ReactDOM.querySelector + ReactDOM.render if you haven't moved to ReactDOM already previously.

Note: to migrate to ReScript-React, you need to be on ReasonReact >=0.8.0. If not, please first upgrade to the latter. Sorry for the trouble.