From a267f1e7b7ac8b89bf7d809f25bd94faf850b727 Mon Sep 17 00:00:00 2001 From: Michael Peyper Date: Sun, 10 Apr 2022 20:39:27 +1000 Subject: [PATCH] chore(docs): add note about React 18 support --- README.md | 17 ++++++++++++++--- docs/introduction.md | 11 +++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fc95d837..a903beb5 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,17 @@ [![Tweet](https://img.shields.io/twitter/url/https/github.com/testing-library/react-hooks-testing-library.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20react-hooks-testing-library%20by%20%40testing-library%20https%3A%2F%2Fgithub.com%2Ftesting-library%2Freact-hooks-testing-library%20%F0%9F%91%8D) +## A Note about React 18 Support + +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 +`react-native-testing-library` +([PR](https://github.com/callstack/react-native-testing-library/pull/923)) with the intention being +to provide a more cohesive and consistent implementation for our users. + +Please be patient as we finalise these changes in the respective testing libraries. + ## Table of Contents @@ -146,9 +157,9 @@ to test against. It also does not come installed with a specific renderer, we cu [`react-test-renderer`](https://www.npmjs.com/package/react-test-renderer) and [`react-dom`](https://www.npmjs.com/package/react-dom). You only need to install one of them, however, if you do have both installed, we will use `react-test-renderer` as the default. For more -information see the [installation docs](https://react-hooks-testing-library.com/installation#renderer). -Generally, the installed versions for `react` and the selected renderer should have matching -versions: +information see the +[installation docs](https://react-hooks-testing-library.com/installation#renderer). Generally, the +installed versions for `react` and the selected renderer should have matching versions: ```sh npm install react@^16.9.0 diff --git a/docs/introduction.md b/docs/introduction.md index de33732a..34467e3e 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -23,6 +23,17 @@ route: '/'
+## A Note about React 18 Support + +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 +`react-native-testing-library` +([PR](https://github.com/callstack/react-native-testing-library/pull/923)) with the intention being +to provide a more cohesive and consistent implementation for our users. + +Please be patient as we finalise these changes in the respective testing libraries. + ## The problem You're writing an awesome custom hook and you want to test it, but as soon as you call it you see