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

Add back missing key prop for SceneWrapperFooter to fix rendering #5040

Merged
merged 1 commit into from
May 29, 2024

Conversation

samholmes
Copy link
Contributor

@samholmes samholmes commented May 28, 2024

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@swansontec
Copy link
Contributor

Why is the PR title so weird?

@samholmes samholmes changed the title Upgrade edge-currency-accountbased@^4.5.3 Add back missing key prop for SceneWrapperFooter to fix rendering May 29, 2024
A change to fix a react warning (yellow box) removed the `key` prop
from SceneFooterWrapper which is required in order for the `onLayout`
handler to be invoked when transitioning between scenes causing a new
SceneFooterWrapper instance to be created in the `MenuTabs` component.
Without a key, the instance is considered a "re-render" of the same
React node and this will potentially omit a layout event from emitting
if the React node is the same layout dimensions. In order to force
React to treat these instances as indeed separate we leverage the `key`
prop. Luckily, it's only necessary to define a key at the top-most
component from `renderFooter`, so we don't need to use the `key` prop
within `SceneFooterWrapper`, so this is the correct way to resolve the
react warning.
@samholmes samholmes enabled auto-merge May 29, 2024 16:47
@samholmes samholmes force-pushed the sam/fix-footer-height-layout-rendering branch from ad0f8b3 to 394edbf Compare May 29, 2024 16:47
@samholmes samholmes merged commit 9e0f583 into develop May 29, 2024
2 checks passed
@samholmes samholmes deleted the sam/fix-footer-height-layout-rendering branch May 29, 2024 16:56
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