Skip to content

Commit

Permalink
Added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Dec 8, 2023
1 parent ea60f02 commit 89e9ab6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/components/src/RandomAreaPlotAnimation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ const RandomAreaPlotAnimation = React.memo(() => {

const [themeColors, setThemeColors] = useState<ThemeColors | null>(null);

// Resolving css variables has to run in `useEffect` or `useLayoutEffect` so
// that we know React has updated the DOM with any styles set by the
// ThemeProvider.
useEffect(() => {
setThemeColors(getRandomAreaPlotAnimationThemeColors());
}, [activeThemes]);
Expand Down

0 comments on commit 89e9ab6

Please sign in to comment.