Skip to content

Commit 2fa1bc2

Browse files
committed
Refine blog post
1 parent f07243a commit 2fa1bc2

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

website/blog/2021-05-07-rescript-migration.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,36 @@
22
title: We are rebranding to ReScript / React
33
---
44

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.
66

77
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).
1111
- 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.
1212

1313
## Migration
1414

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).
1617

17-
### We Need Your Help!
18+
### Important: All Libraries need to be upgraded to `rescript/react`
1819

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.
2021

2122
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.
2223

23-
There are currently two strategies to deal this issue:
24+
**There are currently three strategies to deal this issue:**
2425

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`)
2527
- 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).
2930

3031
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).
3132

3233
We apologize for the inconvenience; we promise that the migration work will be worth it!
3334

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.
3536

3637
Thanks for being part of the ReasonReact community and see you on the ReScript side!

0 commit comments

Comments
 (0)