Skip to content

Commit

Permalink
docs: 📝 Improve callouts
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLambrecht committed Aug 3, 2024
1 parent d4deb4e commit 2ea6196
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/loops-and-intervals/useClock.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This hook creates a sort of clock, i.e. a reactive time-based value that updates

The output of useClock is easily customizable via the `options` argument, see [below](#params).

{: .highlight }
`useClock` is also generic (by default `useClock<string>` is used). The generic type has to be specified if a
custom formatter (see `options.customFormatter`) is used that returns something else than a string.

Expand Down
4 changes: 2 additions & 2 deletions docs/loops-and-intervals/useCounter.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ However, this can be changed via `settings.resetOnStop`. You can manually reset

#### Alternatives

If you want a counter that counts up by 1 every second, you can use the
- If you want a counter that counts up by 1 every second, you can use the
[useTimer()](/react-timing-hooks/intervals-api/useTimer.html) hook.

If you want a counter that starts at a certain number and stops at another, use
- If you want a counter that starts at a certain number and stops at another, use
[useCountdown()](/react-timing-hooks/intervals-api/useCountdown.html).

## Example
Expand Down
4 changes: 2 additions & 2 deletions docs/loops-and-intervals/useInterval.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ By default, the interval is _stopped_ on mount and has to be started manually. I
#### Alternatives

If you want to loop very fast – maybe because you want to animate something –
- If you want to loop very fast – maybe because you want to animate something –
you might want to use [useAnimationFrameLoop()](/react-timing-hooks/animation-api/useAnimationFrameLoop.html) instead which yields better performance in these cases.

If you only want to increase or decrease a numeric value in a regular interval,
- If you only want to increase or decrease a numeric value in a regular interval,
take a look at [useCounter()](/react-timing-hooks/intervals-api/useCounter.html).


Expand Down
3 changes: 3 additions & 0 deletions docs/state/useThrottledState.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ This is also helpful if you have a `useEffect()` hook that you don't want to run
> state variable, it might only be _queued_ for an update. But do not worry: no updates will be lost.
> Eventually the latest call to the `setState` method will always be processed and cause an actual update.
{: .highlight }
Like `useState<T>()`, `useThrottledState<T>()` is also generic to define the type of the state.

## Example

```javascript
Expand Down

0 comments on commit 2ea6196

Please sign in to comment.