|
2 | 2 | title: We are rebranding to ReScript / React
|
3 | 3 | ---
|
4 | 4 |
|
5 |
| -BuckleScript & Reason are now called [ReScript](https://rescript-lang.org/blog/bucklescript-is-rebranding), which means that the **ReasonReact** bindings will now be known as **ReScript / React** and need to move to a different npm package. |
| 5 | +BuckleScript & Reason are now called [ReScript](https://rescript-lang.org/blog/bucklescript-is-rebranding), therefore the **ReasonReact** bindings will now be known as **ReScript / React** and need to be moved to a different npm package. |
6 | 6 |
|
7 | 7 | This means...
|
8 |
| -- Our `reason-react` npm package will now be published as `@rescript/react` |
9 |
| -- `reason-react@0.9.1` is almost equivalent to `rescript-react@0.10.1` (see the [CHANGELOG](https://github.com/rescript-lang/rescript-react/blob/master/Changes.md#v0101) for minor breaking changes). |
10 |
| -- The `reason-react` github repository will be frozen. Please refer to our new repository at [github.com/rescript-lang/rescript-react](https://github.com/rescript-lang/rescript-react). |
| 8 | +- Our `reason-react` npm package will now be published as [`@rescript/react`](https://www.npmjs.com/package/@rescript/react) |
| 9 | +- `rescript-react@0.10.1` is basically a cleaned up version of `reason-react@0.9.1` (see the [CHANGELOG](https://github.com/rescript-lang/rescript-react/blob/master/Changes.md#v0101) for minor breaking changes). |
| 10 | +- The `reason-react` github repository will be archived. Please refer to our new repository at [github.com/rescript-lang/rescript-react](https://github.com/rescript-lang/rescript-react). |
11 | 11 | - The next upcoming `@rescript/react` release will come with a few cool new features! Check out our [RFC discussion](https://forum.rescript-lang.org/t/rfc-rescript-react/901) for more infos.
|
12 | 12 |
|
13 | 13 | ## Migration
|
14 | 14 |
|
15 |
| -The full migration guide can be found on our revamped [ReScript / React documentation](https://rescript-lang.org/docs/react/latest/migrate-from-reason-react). |
| 15 | +From an API perspective, upgrading from `reason-react` to `@rescript/react` should be very easy, since most changes are a just matter of doing a few global search & replaces. |
| 16 | +Details for the changed APIs can be found in our revamped [ReScript / React migration guide](https://rescript-lang.org/docs/react/latest/migrate-from-reason-react). |
16 | 17 |
|
17 |
| -### We Need Your Help! |
| 18 | +### Important: All Libraries need to be upgraded to `rescript/react` |
18 | 19 |
|
19 |
| -In hindsight we realized that `@rescript/react` based projects are not compatible with libraries that depend on the old `reason-react` package. |
| 20 | +Unfortunately `@rescript/react` based projects are not compatible with libraries that depend on the old `reason-react` package due to dependency conflicts. |
20 | 21 |
|
21 | 22 | In other words: If you try to compile a project that uses both, `@rescript/react` and `reason-react`, the compiler will not compile due to a `React` module name collision.
|
22 | 23 |
|
23 |
| -There are currently two strategies to deal this issue: |
| 24 | +**There are currently three strategies to deal this issue:** |
24 | 25 |
|
| 26 | +- As a temporary workaround, use a patching tool like [`npm patch-package`](https://www.npmjs.com/package/patch-package) to adjust the package dependencies of indidvidual bindings to `@rescript/react` (adapt `package.json` & `bsconfig.json`) |
25 | 27 | - Ask the maintainer of your outdated third-party library to create a new major version release with `@rescript/react` as a dependency (don't forget to mention which version supports `@rescript/react` in the README).
|
26 |
| -- Alternatively, create an updated fork of the project, or copy the bindings directly in your ReScript project. |
27 |
| -- Also make sure to rename all `bs-` prefixed library names according to our [ReScript package conventions](https://rescript-lang.org/docs/guidelines/publishing-packages). Otherwise your new libraries will not show up on our [package index](https://rescript-lang.org/packages). |
28 |
| - |
| 28 | +- Or as a third alternative, create an updated fork of the project, or copy the bindings directly in your ReScript project. |
| 29 | + - Also take the occasion to adapt `bs-` prefixed library names to our new [ReScript package conventions](https://rescript-lang.org/docs/guidelines/publishing-packages). Otherwise your new libraries will not show up on our [package index](https://rescript-lang.org/packages). |
29 | 30 |
|
30 | 31 | For more details on the name collision issue, please refer to [this forum post](https://forum.rescript-lang.org/t/discussion-reason-react-rescript-react-migration-path/1086).
|
31 | 32 |
|
32 | 33 | We apologize for the inconvenience; we promise that the migration work will be worth it!
|
33 | 34 |
|
34 |
| -If you need have any questions, open a discussion on the [ReScript Forum](https://forum.rescript-lang.org), or ping @ryyppy / @rickyvetter on Github. |
| 35 | +If you have any questions or migration issues, please open a discussion on the [ReScript Forum](https://forum.rescript-lang.org) to get support, or ping @ryyppy / @rickyvetter on Github. |
35 | 36 |
|
36 | 37 | Thanks for being part of the ReasonReact community and see you on the ReScript side!
|
0 commit comments