Skip to content

Commit

Permalink
fix demo readme
Browse files Browse the repository at this point in the history
  • Loading branch information
goiblas authored and webNeat committed Sep 5, 2021
1 parent 9393f80 commit b28b1b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useIsMounted/README.md
Expand Up @@ -42,7 +42,7 @@ function MyComponent() {
+ const isMounted = useIsMounted()
React.useEffect(() => {
fetchData().then((result) => {
+ if (isMounted) {
+ if (isMounted()) {
setData(result)
+ }
})
Expand Down

0 comments on commit b28b1b2

Please sign in to comment.