Skip to content

Commit 22dfd80

Browse files
committed
update changes and readme
1 parent b977ee8 commit 22dfd80

File tree

4 files changed

+3536
-5
lines changed

4 files changed

+3536
-5
lines changed

Changes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44

55
- Rewrite the `RescriptReactErrorBoundary` component implementation with `@react.component`, so it can be compatible with the changes of JSX PPX.
66

7+
**Breaking:**
8+
9+
- **IMPORTANT** Rewrite the `React` module for compatibility with the JSX PPX V4.
10+
11+
- Remove the deprecation attribute from apis of the new jsx transform which was introduced in React v17.
12+
13+
- The requirements are changed.
14+
- ReScript compiler V10.1+
15+
- ReactJS v18.2.0+
16+
717
## v0.10.3
818

919
- Temporarily remove peerDependency for bs-platform, so we can gracefully do the transition to our new `rescript` package

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## rescript-react
1+
## rescript-react
22

33
> The Official ReScript Bindings for ReactJS
44
@@ -18,6 +18,19 @@ npm install @rescript/react --save
1818

1919
In your `bsconfig.json`:
2020

21+
- v0.11.0+ for React-JSX transformation V4
22+
23+
```
24+
{
25+
"reason": { "react-jsx": 4, "mode": "classic" },
26+
"bs-dependencies": ["@rescript/react"]
27+
}
28+
```
29+
30+
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"`.
31+
32+
- v0.10.3 for React-JSX transformation V3
33+
2134
```
2235
{
2336
"reason": { "react-jsx": 3 },
@@ -31,9 +44,16 @@ In your `bsconfig.json`:
3144

3245
### Requirements
3346

34-
- bs-platform v8.3+
35-
- ReactJS v16.8.1+
36-
- **Optimized for ReScript syntax usage**
47+
- v0.11.0+
48+
49+
- ReScript Compiler v10.1+
50+
- ReactJS v18.2.0+
51+
52+
- v0.10.3
53+
54+
- bs-platform v8.3+
55+
- ReactJS v16.8.1+
56+
- **Optimized for ReScript syntax usage**
3757

3858
### Development
3959

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"react": "^18.2.0",
3333
"react-dom": "^18.2.0",
3434
"reason-test-framework": "^0.3.2",
35-
"rescript": "^10"
35+
"rescript": "^10.1.0"
3636
},
3737
"peerDependencies": {
3838
"react": ">=18.2.0",

0 commit comments

Comments
 (0)