Skip to content

fix: do not start motion in useMemo#200

Merged
littensy merged 2 commits intomainfrom
fix/motion-usememo
Dec 31, 2023
Merged

fix: do not start motion in useMemo#200
littensy merged 2 commits intomainfrom
fix/motion-usememo

Conversation

@littensy
Copy link
Copy Markdown
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