Skip to content

Commit

Permalink
fix(docs): move hook comparison out from details
Browse files Browse the repository at this point in the history
  • Loading branch information
cxspxr committed Oct 25, 2022
1 parent 8f9bf5d commit 8b92544
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,6 @@ You might have noticed that you could simply put your function inside `useAnimat

It is true, however **you should consider using `useListenOnAnimationFrame` with listeners when you want multiple side effects (or callbacks)** for your function on animation frames because of performance implications.

<details>
<summary><b>Explanation</b></summary>

Comparing

```tsx
Expand Down Expand Up @@ -348,6 +345,3 @@ useEffect(() => {
```

Which will effectively call `video.currentTime` once on each animationFrame and 3 listeners to it.

</details>

0 comments on commit 8b92544

Please sign in to comment.