Skip to content

Commit 9d35e1c

Browse files
authored
Merge branch 'main' into jsjoeio-add-test
2 parents c37e8a4 + efd262c commit 9d35e1c

File tree

3 files changed

+34
-7
lines changed

3 files changed

+34
-7
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@
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+
In the mean time you can install `@testing-library/react@^13.1`
51+
4052
## Table of Contents
4153

4254
<!-- START doctoc generated TOC please keep comment here to allow auto update -->

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

package.json

+11-7
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@
5050
},
5151
"dependencies": {
5252
"@babel/runtime": "^7.12.5",
53-
"@types/react": ">=16.9.0",
54-
"@types/react-dom": ">=16.9.0",
55-
"@types/react-test-renderer": ">=16.9.0",
5653
"react-error-boundary": "^3.1.0"
5754
},
5855
"devDependencies": {
56+
"@types/react": "17.0.44",
57+
"@types/react-dom": "17.0.15",
58+
"@types/react-test-renderer": "17.0.1",
5959
"@typescript-eslint/eslint-plugin": "5.11.0",
6060
"@typescript-eslint/parser": "5.11.0",
6161
"all-contributors-cli": "6.20.0",
6262
"codecov": "3.8.3",
63-
"cross-env": "^7.0.3",
63+
"cross-env": "7.0.3",
6464
"docz": "2.3.1",
6565
"docz-theme-default": "1.2.0",
6666
"docz-utils": "2.3.0",
@@ -75,11 +75,15 @@
7575
"typescript": "4.5.5"
7676
},
7777
"peerDependencies": {
78-
"react": ">=16.9.0",
79-
"react-dom": ">=16.9.0",
80-
"react-test-renderer": ">=16.9.0"
78+
"@types/react": "^16.9.0 || ^17.0.0",
79+
"react": "^16.9.0 || ^17.0.0",
80+
"react-dom": "^16.9.0 || ^17.0.0",
81+
"react-test-renderer": "^16.9.0 || ^17.0.0"
8182
},
8283
"peerDependenciesMeta": {
84+
"@types/react": {
85+
"optional": true
86+
},
8387
"react-dom": {
8488
"optional": true
8589
},

0 commit comments

Comments
 (0)