Update formatting

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-01-30 19:40:27 +02:00
parent 9b9e547a93
commit d69d13ee26
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ Renders a button that animates a ripple effect when clicked.
- Use the `useState()` hook to create the `coords` and `isRippling` state variables. These are used for the pointer's coordinates and the animation state of the button respectively.
- Use a `useEffect()` hook to change the value of `isRippling` every time the `coords` state variable changes, starting the animation.
- Use `setTimeout()` in the previous hook to clear the animation after it's done playing.
- Use a `useEffect()` hook to reset `coords` whenever the `isRippling` state variable is `false.`
- Use a `useEffect()` hook to reset `coords` whenever the `isRippling` state variable is `false`.
- Handle the `onClick` event by updating the `coords` state variable and calling the passed callback.
```css