Skip to content

Conversation

@t3rminus
Copy link
Contributor

@t3rminus t3rminus commented Apr 8, 2025

Previously the animation string was calculated with a useMemo hook. The hook was missing the beat dependency, and was partially broken as a result. It likely worked anyway, since SVGR memoized the entire component, and would trigger a re-render if any of the props changed regardless of the hook.

This removes the use of useMemo entirely, since setting the animation string is not computationally complex, so there's little to no benefit to the useMemo hook in addition to the already-memoized component.

…t computationally complex, and the whole component is memoized by svgr.
@RaresAil RaresAil merged commit 7d9c869 into RaresAil:main Apr 8, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants