Skip to content

fix: do not start motion in useMemo #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 31, 2023
Merged

fix: do not start motion in useMemo #200

merged 2 commits into from
Dec 31, 2023

Conversation

littensy
Copy link
Owner

Fixes a memory leak caused by React Strict Mode running useMemo twice on render, which is not ideal for operations with side effects (like connecting to Heartbeat). Updating the Motion has been moved to a manual Heartbeat connection instead of implicitly starting in useMemo.

Upgraded dependencies and applied ESLint and Prettier fixes.

@littensy littensy added type:bug Something isn't working game:app Relating to the React app type:build Affects CI/CD flow labels Dec 31, 2023
@littensy littensy merged commit be1568e into main Dec 31, 2023
@littensy littensy deleted the fix/motion-usememo branch December 31, 2023 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
game:app Relating to the React app type:bug Something isn't working type:build Affects CI/CD flow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant