Skip to content

Commit db18d8c

Browse files
authored
chore(readme): Update the React 18 upgrade docs (#841)
1 parent 7a6e935 commit db18d8c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Diff for: README.md

+16
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@
3939

4040
## A Note about React 18 Support
4141

42+
If you are using the current version of `react-testing-library`, replace
43+
44+
```js
45+
import { renderHook } from '@testing-library/react-hooks'
46+
```
47+
48+
with
49+
50+
```js
51+
import { renderHook } from '@testing-library/react'
52+
```
53+
54+
Once replaced, `@testing-library/react-hooks` can be uninstalled.
55+
56+
### Details
57+
4258
As part of the changes for React 18, it has been decided that the `renderHook` API provided by this
4359
library will instead be included as official additions to both `react-testing-library`
4460
([PR](https://github.com/testing-library/react-testing-library/pull/991)) and

0 commit comments

Comments
 (0)