diff --git a/snippets/Carousel.md b/snippets/Carousel.md index 9fed5f829..83141323b 100644 --- a/snippets/Carousel.md +++ b/snippets/Carousel.md @@ -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`. diff --git a/snippets/useTimeout.md b/snippets/useTimeout.md index f2e5e1203..ae41bb127 100644 --- a/snippets/useTimeout.md +++ b/snippets/useTimeout.md @@ -5,7 +5,7 @@ firstSeen: 2019-08-21T13:20:57+03:00 lastUpdated: 2020-11-16T14:17:53+02:00 --- -Implements `setTimeout` in a declarative manner. +Implements `setTimeout()` in a declarative manner. - Create a custom hook that takes a `callback` and a `delay`. - Use the `useRef()` hook to create a `ref` for the callback function.