Skip to content

Commit a267f1e

Browse files
committed
chore(docs): add note about React 18 support
1 parent 19ac8dd commit a267f1e

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

README.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@
3737
[![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)
3838
<!-- prettier-ignore-end -->
3939

40+
## A Note about React 18 Support
41+
42+
As part of the changes for React 18, it has been decided that the `renderHook` API provided by this
43+
library will instead be included as official additions to both `react-testing-library`
44+
([PR](https://github.com/testing-library/react-testing-library/pull/991)) and
45+
`react-native-testing-library`
46+
([PR](https://github.com/callstack/react-native-testing-library/pull/923)) with the intention being
47+
to provide a more cohesive and consistent implementation for our users.
48+
49+
Please be patient as we finalise these changes in the respective testing libraries.
50+
4051
## Table of Contents
4152

4253
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
@@ -146,9 +157,9 @@ to test against. It also does not come installed with a specific renderer, we cu
146157
[`react-test-renderer`](https://www.npmjs.com/package/react-test-renderer) and
147158
[`react-dom`](https://www.npmjs.com/package/react-dom). You only need to install one of them,
148159
however, if you do have both installed, we will use `react-test-renderer` as the default. For more
149-
information see the [installation docs](https://react-hooks-testing-library.com/installation#renderer).
150-
Generally, the installed versions for `react` and the selected renderer should have matching
151-
versions:
160+
information see the
161+
[installation docs](https://react-hooks-testing-library.com/installation#renderer). Generally, the
162+
installed versions for `react` and the selected renderer should have matching versions:
152163

153164
```sh
154165
npm install react@^16.9.0

docs/introduction.md

+11
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ route: '/'
2323

2424
<hr />
2525

26+
## A Note about React 18 Support
27+
28+
As part of the changes for React 18, it has been decided that the `renderHook` API provided by this
29+
library will instead be included as official additions to both `react-testing-library`
30+
([PR](https://github.com/testing-library/react-testing-library/pull/991)) and
31+
`react-native-testing-library`
32+
([PR](https://github.com/callstack/react-native-testing-library/pull/923)) with the intention being
33+
to provide a more cohesive and consistent implementation for our users.
34+
35+
Please be patient as we finalise these changes in the respective testing libraries.
36+
2637
## The problem
2738

2839
You're writing an awesome custom hook and you want to test it, but as soon as you call it you see

0 commit comments

Comments
 (0)