You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage/basic-hooks.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,8 +59,6 @@ After `increment` is called, the current `count` value now reflects the new valu
59
59
60
60
You may have also noticed that we also wrapped the `increment` call in `act`. This utility simulates how our hook will act in a browser, allowing us to update the values within it. For more details on `act`, please see the [React documentation](https://fb.me/react-wrap-tests-with-act).
61
61
62
-
So there we have it, the first test for our `useCounter` hook.
63
-
64
62
## Providing Props
65
63
66
64
Sometimes a hook relies on the props passed to it in order to do it's thing. For example the `useCounter` hook could easily accept the initial value of the counter as a prop:
0 commit comments