Skip to content

Commit 87497b3

Browse files
praneetrohidaRIP21
authored andcommitted
Update README (#31)
Fix ambiguity in the v1 to v2 migration guide regarding the lifecycle helpers.
1 parent b9ad247 commit 87497b3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,7 @@ const Counter = () => {
231231

232232
- Migration to array based API is a bit more complex but recommended (especially if you're using ESLint rules for hooks).
233233
Take a look at [this section](./README-ARRAY.md#migration-from-object-to-array-based) in array API docs.
234-
- All lifecycle helpers are got removed, please replace them with `useEffect`
235-
`useOnMount` and `useOnUnmount` and `useLifecycleHooks`:
234+
- All lifecycle helpers are removed. Please replace `useOnMount`, `useOnUnmount` and `useLifecycleHooks` with `useEffect`.
236235
This:
237236
```javascript
238237
useOnMount(() => console.log("I'm mounted!"))

0 commit comments

Comments
 (0)