Skip to content

rescript-lang/rescript-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3adb322 · Oct 28, 2022
Sep 19, 2022
Oct 28, 2022
Sep 24, 2022
Dec 30, 2020
Oct 26, 2022
Dec 30, 2020
Oct 19, 2022
Sep 24, 2022
Oct 21, 2022
Oct 21, 2022

Repository files navigation

@rescript/react

The Official ReScript Bindings for ReactJS

Installation

React-JSX transformation V4

The ReScript compiler v10.1+ is required.

npm install @rescript/react --save

In your bsconfig.json:

{
  "jsx": { "version": 4, "mode": "classic" },
  "bs-dependencies": ["@rescript/react"]
}

If you want to try the new jsx transform which was introduced in React v17, set the "mode": "automatic".

If you want to try build your project with JSX v3, see the V3 compatibility mode

Quick Links:

Requirements

  • v0.11.0+

    • ReScript Compiler v10.1+
    • ReactJS v18.0.0+
  • v0.10.3

    • bs-platform v8.3+
    • ReactJS v16.8.1+
    • Optimized for ReScript syntax usage

Development

npm install

# Starts the ReScript compiler in watch mode
npm start

Acknowledgements

This project is the next evolution of the original reason-react bindings.