Skip to content

Memoize cloned configs in gesture hooks - #3816

Merged
j-piasecki merged 2 commits into
nextfrom
@jpiasecki/memoize-cloned-config
Nov 14, 2025
Merged

j-piasecki merged 2 commits into
nextfrom
@jpiasecki/memoize-cloned-config

Conversation

@j-piasecki

@j-piasecki j-piasecki commented Nov 13, 2025 •

Copy link
Copy Markdown
Member

Description

Currently config is cloned and modified on every render in gesture hooks. This PR changes that, so that it's memoized assuming the input is also stable.

Test plan

Verify that if the input config is memoized, the returned gesture reference is stable as long as the config doesn't change (will require other PRs to be merged first).

@m-bert m-bert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

(...)(will require other PRs to be merged first).

Could you add those PRs to the description (if they're already submitted)?

Base automatically changed from @jpiasecki/memoize-event-handlers to next November 14, 2025 08:35
@j-piasecki
j-piasecki merged commit e594da5 into next Nov 14, 2025
2 checks passed
@j-piasecki
j-piasecki deleted the @jpiasecki/memoize-cloned-config branch November 14, 2025 14:17
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