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

Commits on May 29, 2024

  1. Add back missing key prop for SceneWrapperFooter to fix rendering

    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 committed May 29, 2024
    Configuration menu
    Copy the full SHA
    394edbf View commit details
    Browse the repository at this point in the history