You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add unreleased PRs into CHANGES.md
* Update @testing-library/react to latest with React 19
* Remove version and metadata on package.json
* Fix melange dep in dune-project, from 5cd0660
* Rename ReasonReact to reason-react
* Review most React 19's API (#894)
* Rename ReasonReact to reason-react
* Add initialValue into useDeferredValue
* Add useTransitionAsync
* Add Experimental.promise
* Add initialValue into useDeferredValue in React.rei
* Explain new (2020) jsx transformation (#896)
* Add 5.1.0 as lower bound
* Update opam-check-npm-deps react, react-dom to 19.1.0
* Add ?dev in demo, and add example for fragments
* Update CHANGES.md
Co-authored-by: Corentin Leruth <[email protected]>
* Add without forward ref in demo
* Add deprecation to unmountComponentAtNode
* make demo only build on dev
---------
Co-authored-by: Corentin Leruth <[email protected]>
Copy file name to clipboardExpand all lines: CHANGES.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,15 @@
1
1
# Unreleased
2
2
3
+
* FEATURE: add color to domProps (@tatchi in https://github.com/reasonml/reason-react/pull/871)
4
+
* BREAKING: Support for React 19 (@davesnx in #846)
5
+
* DOCS: Documentation updates for 0.16 (@davesnx in https://github.com/reasonml/reason-react/pull/864)
6
+
* INFRA: Update deps (@johnhaley81 in https://github.com/reasonml/reason-react/pull/876)
7
+
* INFRA: update setup-ocaml to v3 (@anmonteiro in https://github.com/reasonml/reason-react/pull/878)
8
+
* FIX: Remove raise annotations and fix locations on errors (@davesnxhttps://github.com/reasonml/reason-react/pull/863)
9
+
* FIX: type of pipeable stream to allow objects with keys (@anmonteiro in https://github.com/reasonml/reason-react/pull/854)
10
+
* FEATURE: Add `preconnect`, `prefetchDNS`, `preinit`, `preinitModule`, `preload` and `preloadModule` in ReactDOM.Experimental (@r17x in https://github.com/reasonml/reason-react/pull/849)
11
+
* BREAKING: Make lowerbound be Melange 5.1 (due to Js.FormData.t usage)
Copy file name to clipboardExpand all lines: docs/jsx.md
+40-28Lines changed: 40 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,19 @@
2
2
title: JSX
3
3
---
4
4
5
-
Reason comes with the [JSX](https://reasonml.github.io/docs/en/jsx.html) syntax! ReasonReact works very similar to how [the ReactJS JSX transform](https://reactjs.org/docs/introducing-jsx.html) does.
5
+
Reason comes with [JSX](https://reasonml.github.io/docs/en/jsx.html) syntax. Enables representation of HTML-like expressions within the language.
6
+
7
+
reason-react enables [the ReactJS JSX transform](https://reactjs.org/docs/introducing-jsx.html) in Reason.
8
+
9
+
Since `reason-react.0.12.0`, the JSX transformation currently supports the [New JSX Transform](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html). JSX functions are imported from `react/jsx-runtime`. Previous versions of reason-react used the legacy API `React.createElement`.
10
+
11
+
# Install
6
12
7
13
To use it, you would need to install [`reason-react-ppx`](https://opam.ocaml.org/packages/reason-react-ppx/) and add `(preprocess (pps reason-react-ppx))` in [`melange.emit or library`](https://dune.readthedocs.io/en/stable/melange.html) stanzas in your `dune` file.
8
14
9
-
Here's a list of transformations made by the [ppx](https://ocaml.org/docs/metaprogramming):
15
+
# What the ppx does
16
+
17
+
Here's a list of transformations made by the [ppx](https://ocaml.org/docs/metaprogramming).
10
18
11
19
## Uncapitalized
12
20
@@ -17,27 +25,26 @@ Here's a list of transformations made by the [ppx](https://ocaml.org/docs/metapr
The `make` above is exactly the same `make` function you've seen in the previous section.
102
107
103
-
`ref` and `key` are reserved in ReasonReact, just like in ReactJS. **Don't** use them as props in your component!
108
+
`ref` and `key` are reserved in reason-react, just like in ReactJS. **Don't** use them as props in your component!
104
109
105
110
## Fragment
106
111
112
+
Fragment lets you group elements without a wrapper node, and return a single element without any effect on the DOM. More details about this in the [react documentation: Fragments](https://react.dev/reference/react/Fragment).
113
+
114
+
The empty JSX tag `<></>` is shorthand for `<React.Fragment></React.Fragment>`
Copy file name to clipboardExpand all lines: dune-project
+3-8Lines changed: 3 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -31,15 +31,10 @@
31
31
(name reason-react)
32
32
(synopsis"Reason bindings for React.js")
33
33
(description
34
-
"ReasonReact helps you use Reason to build React components with deeply integrated, strong, static type safety.\n\nIt is designed and built by people using Reason and React in large, mission critical production React codebases.")
34
+
"reason-react helps you use Reason to build React components with deeply integrated, strong, static type safety.\n\nIt is designed and built by people using Reason and React in large, mission critical production React codebases.")
0 commit comments