-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
3 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters