Omit null state and props to fix default props#5
Merged
roryabraham merged 2 commits intomasterfrom Nov 17, 2020
Merged
Conversation
Contributor
|
Looks good, but why remove null state instead of just null props? |
Contributor
Author
We are passing the state of the I actually ran into this breaking a component while testing (I think it was the typing indicator |
Contributor
|
Ohh gotcha. Thanks, that was super obvious looking at it again. This PR looks good to me, but I'm going to hold off on merging it because there were some issues I ran into when testing Expensify/App#795. I'll post about them over there. |
Contributor
|
Okay, issues were resolved over there so I'm merging. |
42 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of https://github.com/Expensify/Expensify/issues/144333
React will only replace
undefinedprops with defaultProps. We want to omit any state or props that are null when passing them to wrapped components to fix default props.Test with Expensify/App#795
cc: @roryabraham @marcaaron