Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier committed Nov 2, 2024
1 parent 9ecce0d commit 03678d0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/migration/v12.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const MyComponent = ({ options = arr }) => {
/* ... */
}
```

:::

### Tests
Expand Down Expand Up @@ -162,7 +163,7 @@ Here are some examples that illustrate the changes:

##### `renderHook`

`renderHook` is not a separate library anymore; it is part of the `@testing-library/react`, and it has [quite a different API](https://testing-library.com/docs/react-testing-library/api/#renderhook).
`renderHook` is not a separate library anymore; it is part of the `@testing-library/react`, and it has [quite a different API](https://testing-library.com/docs/react-testing-library/api/#renderhook).

:::warning Note
Some docs online still point to the old version, which can be confusing.
Expand Down Expand Up @@ -300,9 +301,9 @@ With the migration away from Create React App, the formatting for environment va

As before, environment variables with names that start with `DHIS2_` are added to the app, and can be picked up from `.env` files or on the command line for example. Before, the platform had to add `REACT_APP_` before `DHIS2_` so that Create React App would add the variable to the app, so a variable like `DHIS2_MY_VAR` in the environment would become accessible on `process.env.REACT_APP_DHIS2_MY_VAR` in the app. Now, the `REACT_APP_` prefix isn't needed, so the variable can be accessed on just `process.env.DHIS2_MY_VAR`.

The `REACT_APP_`-prefixed variables are now deprecated and will be removed in the next major version. However they will be kept around alongside the shorter `DHIS2_` variables in this version for backwards compatibility.
The `REACT_APP_`-prefixed variables are now deprecated and will be removed in the next major version. However they will be kept around alongside the shorter `DHIS2_` variables in this version for backwards compatibility.

For example, both `process.env.REACT_APP_DHIS2_MY_VAR` and `process.env.DHIS2_MY_VAR` will be available.
For example, both `process.env.REACT_APP_DHIS2_MY_VAR` and `process.env.DHIS2_MY_VAR` will be available.

:::tip
The `REACT_APP_` prefixed variables will be removed in the next version, so make sure to migrate to the shorter `DHIS2_` variable names.
Expand All @@ -322,7 +323,7 @@ Here are some edge cases that were encountered when upgrading some apps with the

## Full list of breaking changes and deprecations

The most likely and impactful breaking changes have been described in detail above. However this doesn't cover all the breaking changes and deprecations introduced in this upgrade. Below is the exhausted list.
The most likely and impactful breaking changes have been described in detail above. However this doesn't cover all the breaking changes and deprecations introduced in this upgrade. Below is the exhausted list.

### Breaking changes

Expand Down

0 comments on commit 03678d0

Please sign in to comment.