Update formatting
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user