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

Memoize markdownUtils inside the commit hook #541

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

j-piasecki
Copy link
Collaborator

Details

Instead of creating RCTMarkdownUtils every time the commit hook is run, memoize it in the state of the decorator shadow node. We can accomplish that by cloning the decorator node after the text input node is cloned. This way, we can clone the decorator in-place since the parent would be mutable at that point in time.

Manual Tests

Verify that the library still works and isn't flickering on the new architecture

@j-piasecki j-piasecki changed the title @jpiasecki/memoize utils commit hook Memoize markdownUtils inside the commit hook Nov 7, 2024
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.

1 participant