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

Prevent unnecessary rerenders for PlaidEmbeddedLink #343

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

malthusplaid
Copy link
Contributor

When the parent component of PlaidEmbeddedLink rerenderers, the component ends up unmounting and invoking createEmbedded again, causing the iframe to reload.

The fix is to stabilize the config object with useMemo if the component props didn't change.

Added unit tests to validate the fix

Copy link

@cvidrine cvidrine left a comment

Choose a reason for hiding this comment

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

🚂

@malthusplaid malthusplaid merged commit e025b96 into master Jun 13, 2024
1 of 2 checks passed
@malthusplaid malthusplaid deleted the my-memo-embedded branch June 13, 2024 18:28
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