Skip to content

Update README, link to documentation #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 8 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,17 @@
## @rescript/react

> The Official ReScript Bindings for ReactJS

- [Documentation](https://rescript-lang.org/docs/react/latest/introduction)

### Installation

#### React-JSX transformation V4

- [Documentation](https://github.com/rescript-lang/syntax/blob/master/cli/JSXV4.md)

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](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) 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](https://github.com/rescript-lang/syntax/blob/master/cli/JSXV4.md)

**Quick Links:**
> The Official [ReScript](https://rescript-lang.org) Bindings for [ReactJS](https://react.dev/)

- [Introduction](https://rescript-lang.org/docs/react/latest/introduction)
- [Installation](https://rescript-lang.org/docs/react/latest/installation)

### Requirements

- v0.12.0+:

- ReScript Compiler v11.0+
- ReactJS v18.0.0+

- v0.11.0

- ReScript Compiler v10.1+
- ReactJS v18.0.0+

- v0.10.3
### Versions

- bs-platform v8.3+
- ReactJS v16.8.1+
- **Optimized for ReScript syntax usage**
| @rescript/react | ReScript | ReactJS | Documentation |
| --------------- | -------- | ------- | ----------------------------------------------------------------- |
| 0.12.0+ | 11.0+ | 18.0.0+ | [Link](https://rescript-lang.org/docs/react/latest/introduction) |
| 0.11.0 | 10.1 | 18.0.0+ | [Link](https://rescript-lang.org/docs/react/v0.11.0/introduction) |
| 0.10.3 | 8.3 | 16.8.1+ | [Link](https://rescript-lang.org/docs/react/v0.10.0/introduction) |

### Development

Expand Down