Skip to content

Commit

Permalink
docs: small revisions in react 18 section
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier committed Nov 1, 2024
1 parent 271e359 commit 4178b36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/migration/v12.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Check out the [script docs](../scripts/migrate/js-to-jsx.md) for options, tips,

## React 18

With this update we also upgraded from React 16 to React 18. Upgrading to `@dhis2/cli-app-scripts` version 12 should generally a smooth process for the consuming apps. Most of the [changes](https://react.dev/blog/2022/03/08/react-18-upgrade-guide) shouldn't affect most apps.
With this update, we also upgraded from React 16 to React 18. Upgrading to `@dhis2/cli-app-scripts` version 12 should generally a smooth process for the consuming apps. Most of the [changes](https://react.dev/blog/2022/03/08/react-18-upgrade-guide) shouldn't affect most apps.

### Default props

Expand Down Expand Up @@ -289,7 +289,7 @@ describe('<Comment />', () => {
Enzyme is [considered dead](https://dev.to/wojtekmaj/enzyme-is-dead-now-what-ekl): there is no official adapter for React 18 (or 17), so it's best to [migrate to React Testing Library](https://testing-library.com/docs/react-testing-library/migrate-from-enzyme/) for tests, if possible.

:::tip
If it's not currently possible to migrate, there is an [unofficial React 18 adapter](https://github.com/cfaester/enzyme-adapter-react-18) that can help in the mean time. However, it is highly recommended this is a temporary solution and you should still schedule migrating away from Enzyme.
If it's not currently possible to migrate, there is an [unofficial React 18 adapter](https://github.com/cfaester/enzyme-adapter-react-18) that can help in the mean time. However, this should be considered a temporary solution, and migrating away from Enzyme should be scheduled.
:::

## Environment variables
Expand Down

0 comments on commit 4178b36

Please sign in to comment.