|
1 | 1 | ## @rescript/react |
2 | 2 |
|
3 | | -> The Official ReScript Bindings for ReactJS |
4 | | -
|
5 | | -- [Documentation](https://rescript-lang.org/docs/react/latest/introduction) |
6 | | - |
7 | | -### Installation |
8 | | - |
9 | | -#### React-JSX transformation V4 |
10 | | - |
11 | | -- [Documentation](https://github.com/rescript-lang/syntax/blob/master/cli/JSXV4.md) |
12 | | - |
13 | | -The ReScript compiler v10.1+ is required. |
14 | | - |
15 | | -``` |
16 | | -npm install @rescript/react --save |
17 | | -``` |
18 | | - |
19 | | -In your `bsconfig.json`: |
20 | | - |
21 | | -``` |
22 | | -{ |
23 | | - "jsx": { "version": 4, "mode": "classic" }, |
24 | | - "bs-dependencies": ["@rescript/react"] |
25 | | -} |
26 | | -``` |
27 | | - |
28 | | -If you want to try [the new jsx transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) which was introduced in React v17, set the `"mode": "automatic"`. |
29 | | - |
30 | | -If you want to try build your project with JSX v3, see [the V3 compatibility mode](https://github.com/rescript-lang/syntax/blob/master/cli/JSXV4.md) |
31 | | - |
32 | | -**Quick Links:** |
| 3 | +> The Official [ReScript](https://rescript-lang.org) Bindings for [ReactJS](https://react.dev/) |
33 | 4 |
|
34 | 5 | - [Introduction](https://rescript-lang.org/docs/react/latest/introduction) |
| 6 | +- [Installation](https://rescript-lang.org/docs/react/latest/installation) |
35 | 7 |
|
36 | | -### Requirements |
37 | | - |
38 | | -- v0.12.0+: |
39 | | - |
40 | | - - ReScript Compiler v11.0+ |
41 | | - - ReactJS v18.0.0+ |
42 | | - |
43 | | -- v0.11.0 |
44 | | - |
45 | | - - ReScript Compiler v10.1+ |
46 | | - - ReactJS v18.0.0+ |
47 | | - |
48 | | -- v0.10.3 |
| 8 | +### Versions |
49 | 9 |
|
50 | | - - bs-platform v8.3+ |
51 | | - - ReactJS v16.8.1+ |
52 | | - - **Optimized for ReScript syntax usage** |
| 10 | +| @rescript/react | ReScript | ReactJS | Documentation | |
| 11 | +| --------------- | -------- | ------- | ----------------------------------------------------------------- | |
| 12 | +| 0.12.0+ | 11.0+ | 18.0.0+ | [Link](https://rescript-lang.org/docs/react/latest/introduction) | |
| 13 | +| 0.11.0 | 10.1 | 18.0.0+ | [Link](https://rescript-lang.org/docs/react/v0.11.0/introduction) | |
| 14 | +| 0.10.3 | 8.3 | 16.8.1+ | [Link](https://rescript-lang.org/docs/react/v0.10.0/introduction) | |
53 | 15 |
|
54 | 16 | ### Development |
55 | 17 |
|
|
0 commit comments