mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Allow update of state to receive null objects
Summary: This diff changes updateState method to support null stateWrappers, before this method would crash with a NullPointerException, now it allows the null object to reach the view manager. Changelog: Add support for update of nullable localState in Fabric Reviewed By: JoshuaGross Differential Revision: D17939651 fbshipit-source-id: c62555905e39f9e0db75b9e1d1b93f33d0560266
This commit is contained in:
1 parent
79b573511b
commit
c65267ca6f
6 files changed
+13
-10
No files matched your search
@@ -282,7 +282,7 @@ public abstract class ViewManager<T extends View, C extends ReactShadowNode>
|
||||
* this component type.
|
||||
*/
|
||||
public @Nullable Object updateState(
|
||||
@NonNull T view, ReactStylesDiffMap props, StateWrapper stateWrapper) {
|
||||
@NonNull T view, ReactStylesDiffMap props, @Nullable StateWrapper stateWrapper) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user