Skip to content
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

perf: use useCallbacks for handlers and deconstruct events #7004

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

VIKTORVAV99
Copy link
Member

Issue

The handlers are not wrapped in useCallbacks and are re-created on each render.

Description

Wraps the handlers in useCallbacks to avoid recreating them and deconstructs the event objects to optimize the size a bit.

Double check

  • I have run pnpx prettier@2 --write . and poetry run format in the top level directory to format my changes.

Copy link
Collaborator

@tonypls tonypls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@VIKTORVAV99 VIKTORVAV99 enabled auto-merge (squash) August 8, 2024 09:06
@VIKTORVAV99 VIKTORVAV99 merged commit d76b2b4 into master Aug 8, 2024
21 checks passed
@VIKTORVAV99 VIKTORVAV99 deleted the vik/wrap_map_handlers_in_useCallbacks branch August 8, 2024 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants