Update formatting

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-01-29 20:36:28 +02:00
parent 8683f4d233
commit 9b9e547a93
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ lastUpdated: 2020-11-03T20:42:15+02:00
Renders a carousel component.
- Use the `useState()` hook to create the `active` state variable and give it a value of `0` (index of the first item).
- Use the `useEffect()` hook to update the value of `active` to the index of the next item, using `setTimeout`.
- Use the `useEffect()` hook to update the value of `active` to the index of the next item, using `setTimeout()`.
- Compute the `className` for each carousel item while mapping over them and applying it accordingly.
- Render the carousel items using `React.cloneElement()` and pass down `...rest` along with the computed `className`.