Skip to content

Commit

Permalink
Create a blog entry
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Jul 11, 2023
1 parent f6187dc commit eed9f91
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions website/blog/2023-06-11-reborn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: ReasonReact is back (Melange from now on)
---

Since the ReScript project diverged from ReasonML and moved ReasonReact into `@rescript/react`, ReasonReact has been in limbo. While this happened, the Melange team released the first major release of [Melange](https://buttondown.email/anmonteiro/archive/melange-hits-v10/) and made the first steps towards a deeper integration with the OCaml ecosystem.

We are happy to announce that ReasonReact is back and will be maintained and developed by the Melange team.

## What does this mean

We released ReasonReact to the [opam registry](https://opam.ocaml.org/packages/reason-react) and be installed with opam or esy if you prefer (even though Melange team recommends using opam).

We updated the documentation to reflect these new changes and we will continue to improve it.

## Changes

The previous version published in npm compatible with ReScript is 0.9.0. Between 0.9.0 and 0.11.0, 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

## Migration

First make sure your project builds with Melange, once this is done, you can follow the migration guide:

- Install latest version of ReasonReact: `opam install reason-react`
- Use this as a package in the dune file `(libraries reason-react)` (make sure to add `react-jsx-ppx` on the pps as well).
- Remove usages of modules `ReactDOMRe`, `ReactEventRe`, `ReasonReact`, `ReasonReactCompat`, `ReasonReactOptimizedCreateClass`. They were deprecated a long time ago, but we removed them in this version. There should be a 1:1 mapping between the old modules and the new ones.

## 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) such as [https://github.com/ahrefs/melange-react-dates](melange-react-dates) or [melange-recharts](https://github.com/ahrefs/melange-recharts).

There's a lot of work to do for 0.12 work, but we are excited to continue to improve ReasonReact and make it a great library for the Melange and ReasonML community.

- Bring reacjs-jsx-ppx into this repository
- Use the JSX transformation from React 17
- Fix code-generation locations for JSX and props
- A bunch of documentation work

Please contact us if you have any questions or want to help, joining [our Discord](https://discord.gg/reasonml) is the best way to reach us.

Have a good day!

0 comments on commit eed9f91

Please sign in to comment.