Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not discard props when setNativeProps is used (#47669)
Summary: Pull Request resolved: #47669 When investigating [#47476](#47476), I found that the `secureTextInput` prop was not changing in the Mounting layer when changing it in JS. I track down the problem to the `UIManager::cloneNode` method. When we clone the node, we first merge the patch that arrives from React into the props controlled by setNativeProps, ignoring the patch's props that are controlled by React. But then, we forgot to merge back the React's controlled property into the final props, effectively losing them. This change adds an extra merging step, merging the props controlled with setNativeProps back into the patch of props controlled by React, and then using this new set of props as source of truth. ## Changelog: [General][Fixed] - do not discard props in the patch when they are not null while using `useNativeProps` Reviewed By: sammy-SC Differential Revision: D65948574 fbshipit-source-id: db4f2b793f4a6348456933c95a151012252b8ebc
- Loading branch information