Skip to content

Commit

Permalink
[Example] Fix interrupted animation of Letters in development (#5694)
Browse files Browse the repository at this point in the history
## Summary

Currently, in development the animation in Letters gets interrupted near
its end and stays like this, which doesn't look right. This doesn't
happen in production builds however - it seems to be related to
`setInterval` repetition time parameter - making it longer makes the
behavior uniform in both development and production.

## Test plan

💌
  • Loading branch information
tjzel authored Feb 20, 2024
1 parent 2e80dad commit 34c377e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/examples/LettersExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function LettersExample() {
useEffect(() => {
const id = setInterval(() => {
setState((s) => !s);
}, 2000);
}, 3500);
return () => clearInterval(id);
}, []);

Expand Down

0 comments on commit 34c377e

Please sign in to comment.