@@ -19,7 +19,7 @@ route: '/reference/api'
19
19
20
20
``` ts
21
21
function renderHook(
22
- callback : (props ? : any ): any ,
22
+ callback : (props ? : any ) => any ,
23
23
options ? : RenderHookOptions
24
24
): RenderHookResult
25
25
```
@@ -103,9 +103,10 @@ function hydrate(): void
103
103
> This is only used when using the ` server ` module . See [SSR ](/ usage / ssr - hooks ) for more information
104
104
> on server - side rendering your hooks .
105
105
106
- A function to hydrate the component. This is required before you can interact with the hook, whether
107
- that is an `act` or `rerender` call. Some effects such as `useEffect` will not be called unless
108
- `hydrate` is called.
106
+ A function to hydrate a server rendered component into the DOM. This is required before you can
107
+ interact with the hook, whether that is an `act` or `rerender` call. Effects created using
108
+ `useEffect` or `useLayoutEffect` are also not run on server rendered hooks until `hydrate` is
109
+ called.
109
110
110
111
### ` ...asyncUtils `
111
112
@@ -117,7 +118,7 @@ Utilities to assist with testing asynchronous behaviour. See the
117
118
## ` act `
118
119
119
120
This is the same [` act ` function ](https : // reactjs.org/docs/test-utils.html#act) function that is
120
- exported from your chosen renderer . Although , they both work the same .
121
+ exported from your [ chosen renderer ](/ installation # renderer ) .
121
122
122
123
---
123
124
@@ -157,7 +158,7 @@ module.exports = {
157
158
158
159
Alternatively , you can change your test to import from ` @testing-library/react-hooks/pure ` instead
159
160
of the regular imports. This applys to any of our export methods documented in
160
- [Rendering ](/rendering #being -specific ).
161
+ [Rendering ](/installation #being -specific ).
161
162
162
163
` ` ` diff
163
164
- import { renderHook, cleanup, act } from '@testing-library/react-hooks'
0 commit comments