-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a blog entry for 0.11 and Melange (#743)
Co-authored-by: Javier Chávarri <javier.chavarri@gmail.com> Co-authored-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
- Loading branch information
1 parent
684ffac
commit eeb3628
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: ReasonReact is back (and powered by Melange) | ||
--- | ||
|
||
ReasonReact moved to `@rescript/react` after the ReScript announcement. The future of ReasonReact has been uncertain ever since. In the meantime, the Melange team announced the first major release of [Melange](https://anmonteiro.substack.com/p/melange-10-is-here) and took the first steps towards deeper integration with the OCaml ecosystem. | ||
|
||
Today, we are happy to announce that ReasonReact is back and will be maintained by the Melange team going forward. | ||
|
||
## What's changing? | ||
|
||
We released ReasonReact to the [opam repository](https://ocaml.org/p/reason-react/latest). In the Melange docs, we document [how to depend](https://melange.re/v1.0.0/package-management/) on packages in opam. | ||
|
||
We updated the documentation to reflect these new changes and we will continue to improve it over time. | ||
|
||
## Adopting ReasonReact | ||
|
||
To use ReasonReact, you must be using Melange. [Get started here](https://melange.re/v1.0.0/getting-started/). | ||
|
||
Next: | ||
|
||
- Install the latest version of ReasonReact: `opam install reason-react` | ||
- In your dune file, add `reason-react` to `libraries` and preprocess with `reactjs-jsx-ppx`: | ||
|
||
> (libraries reason-react) | ||
> (preprocess (pps react-jsx-ppx)) | ||
- Replace any previously deprecated modules with their new names: `ReactDOMRe` -> `ReactDOM`, `ReactEventRe` -> `ReactEvent`, `ReasonReact` -> `React`. | ||
- Remove any usage of `ReasonReactCompat` and `ReasonReactOptimizedCreateClass`. These have long been deprecated, and have been removed in this version. | ||
|
||
## Future | ||
|
||
We started moving all ReasonReact related packages to Melange and 0.11 and want to make sure the ReasonML community can update the 3rd party libraries to use Melange as well. | ||
|
||
Some of them are published in [github.com/melange-community](https://github.com/melange-community/) or [github.com/ahrefs](https://github.com/ahrefs). Examples include [melange-react-dates](https://github.com/ahrefs/melange-react-dates) or [melange-recharts](https://github.com/ahrefs/melange-recharts). | ||
|
||
There's lots to do for the next version. We are committed to continue improving ReasonReact and make it a great library for the Melange and ReasonML community. In the future, we expect to make the following changes: | ||
|
||
- Track `reacjs-jsx-ppx` in this repository, and rename it to `reason-react-ppx`, a more suitable name | ||
- Use the [new JSX transform](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) from React 17 | ||
- Fix code-generation locations for JSX and props | ||
- Continue improving the documentation | ||
|
||
Feel free to reach out if you have any feedback. You can [open an issue](https://github.com/reasonml/reason-react/issues) in this repository, or join the [ReasonML Discord](https://discord.gg/reasonml). | ||
|
||
## Full changelog | ||
|
||
The version of ReasonReact published to npm is compatible with ReScript 0.9.0. Since then, we've fixed a few things: | ||
|
||
- [0.9.2] Add drag event API binding | ||
- [0.9.2] Add `aria-haspopup` as ariaHaspopup as prop | ||
- [0.9.2] Add `aria-current` as ariaCurrent as prop | ||
- [0.9.2] Add `aria-checked` as ariaChecked as prop | ||
- [0.10.0] Deprecate legacy modules (ReasonReact, ReasonReactCompat, ReasonReactOptimizedCreateClass) | ||
|
||
### Version 0.11 | ||
|
||
- [0.11.0] Add suppressHydrationWarning | ||
- [0.11.0] Created opam package (reason-react.opam) | ||
- [0.11.0] Requires dune 3.8.0 (via dune-project) | ||
- [0.11.0] Full migration to Melange | ||
|
||
Have a good day! |