-
Notifications
You must be signed in to change notification settings - Fork 43
Update new jsx transform apis, bind to Jsx in compiler, for JSX V4. #49
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
Changes from 29 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
2f9884a
update new jsx transform apis with Jsx module
mununki 7d6b9d5
restore external binding for primitives
mununki 2aa4d91
fix jsxFragment type
mununki 9e0da07
add RescriptReact for ppx v4
mununki 9c99211
fix typo
mununki 7859a5d
bind type to JsxEvent
mununki dc7737c
add ErrorBoundary comp for ppx v4
mununki aeed8dc
bind ReactDOMStyle.t to JsxDOMStyle.t
mununki 057e565
merge RescriptReact into React for V4 support
mununki b977ee8
upgrade package.json
mununki 22dfd80
update changes and readme
mununki 77bf2b3
fix readme
mununki d0cc22e
update installation in readme
mununki 5d0fcab
Update Changes.md
cristianoc 4f82de7
Update Changes.md
cristianoc cb28860
remove unecessary yarn.lock
mununki b7c0536
fix binding of react components for V4
mununki 9ac34b0
fix released rescript version in deps
mununki 85f4244
addKepProp function
mununki 5fd8b75
Revert "addKepProp function"
mununki a4c31f8
add createElementWithKey
mununki 6c8131d
Install latest compiler.
cristianoc 219c6b0
Update nodejs.yml
cristianoc 86401bc
add ReactV3 for backward compatibility
mununki 814101b
fix typo createElementVariadicWithKey
mununki 32809fc
add addKeyProp
mununki 87e1521
private addKeyProp
mununki bf2f897
add React.fragment and ReactDOM.createElement
mununki 5eacba1
update changelog
mununki adb9fc4
udpate doc and version
mununki 1ae5b75
add comment to React_V3
mununki 8ef74a4
Update Changes.md
cristianoc b3bfa61
Update package-lock.json
cristianoc 8d5fc11
Check in generated files.
cristianoc f4f3064
Remove reason-test-framework
cristianoc 2bbe05d
Use compiler 10.1.0-alpha.2
cristianoc 8d946e7
Remove jest.
cristianoc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
## rescript-react | ||
## rescript-react | ||
|
||
> The Official ReScript Bindings for ReactJS | ||
|
||
|
@@ -12,12 +12,33 @@ | |
|
||
### Installation | ||
|
||
#### React-JSX transformation V4 | ||
cristianoc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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"`. | ||
|
||
#### React-JSX transformation V3 | ||
cristianoc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
``` | ||
npm install @rescript/[email protected] --save | ||
``` | ||
|
||
In your `bsconfig.json`: | ||
|
||
``` | ||
{ | ||
"reason": { "react-jsx": 3 }, | ||
|
@@ -31,9 +52,16 @@ In your `bsconfig.json`: | |
|
||
### Requirements | ||
|
||
- bs-platform v8.3+ | ||
- ReactJS v16.8.1+ | ||
- **Optimized for ReScript syntax usage** | ||
- v0.11.0+ | ||
|
||
- ReScript Compiler v10.1+ | ||
- ReactJS v18.2.0+ | ||
|
||
- v0.10.3 | ||
|
||
- bs-platform v8.3+ | ||
- ReactJS v16.8.1+ | ||
- **Optimized for ReScript syntax usage** | ||
|
||
### Development | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.