From 5a214c42440a0c21242f3b6791e9071d0b91d532 Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Wed, 18 May 2022 14:54:35 +0200 Subject: [PATCH] chore(docs): update note about React 18 support --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index a903beb5..356d4578 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,22 @@ ## A Note about React 18 Support +If you are using the current version of `react-testing-library`, replace + +```js +import { renderHook } from '@testing-library/react-hooks' +``` + +with + +```js +import { renderHook } from '@testing-library/react' +``` + +Once replaced, `@testing-library/react-hooks` can be uninstalled. + +### Details + As part of the changes for React 18, it has been decided that the `renderHook` API provided by this library will instead be included as official additions to both `react-testing-library` ([PR](https://github.com/testing-library/react-testing-library/pull/991)) and