@@ -95,8 +95,8 @@ you, your team, and your project.
9595## Async
9696
9797Sometimes, a hook can trigger asynchronous updates that will not be immediately reflected in the
98- ` result.current ` value. Luckily, ` renderHook ` returns some utilities that allows the test to wait
99- for the hook to update using ` async/await ` (or just promise callbacks if you prefer). The most basic
98+ ` result.current ` value. Luckily, ` renderHook ` returns some utilities that allow the test to wait for
99+ the hook to update using ` async/await ` (or just promise callbacks if you prefer). The most basic
100100async utility is called ` waitForNextUpdate ` .
101101
102102Let's further extend ` useCounter ` to have an ` incrementAsync ` callback that will update the ` count `
@@ -132,16 +132,16 @@ test('should increment counter after delay', async () => {
132132})
133133```
134134
135- Wrapping ` incrementAsync ` in ` act() ` is not necessary since the state updates happen
136- asynchronously during ` await waitForNextUpdate() ` . The async utilities automatically wrap the
137- waiting code in the asynchronous ` act() ` wrapper.
135+ Wrapping ` incrementAsync ` in ` act() ` is not necessary since the state updates happen asynchronously
136+ during ` await waitForNextUpdate() ` . The async utilities automatically wrap the waiting code in the
137+ asynchronous ` act() ` wrapper.
138138
139- For more details on the the other async utilities, please refer to the
139+ For more details on the other async utilities, please refer to the
140140[ API Reference] ( /reference/api#asyncutils ) .
141141
142142### Suspense
143143
144- All the [ async utilities] ( /reference/api#async-utilities ) will also wait for hooks that suspends
144+ All the [ async utilities] ( /reference/api#async-utilities ) will also wait for hooks that suspend
145145using [ React's ` Suspense ` ] ( https://reactjs.org/docs/react-api.html#reactsuspense ) functionality to
146146complete rendering.
147147
0 commit comments