mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
874881e73e
Summary: changelog: [internal] This is experimental implementation of `setNativeProps` in Fabric. This diff brings `setNativeProps` to Fabric to make migration easier. I tried to stay as close as possible to Paper's behaviour, with all of its flaws (ready CAUTION section on https://reactnative.dev/docs/direct-manipulation) State can't be stored in views because on iOS, eventually on Android, views are not the source of truth, shadow tree is. Fabric's implementation keeps state from setNativeProps in shadow node family in very inefficient data structure folly::dynamic. It is always reconciled with new prop updates. The performance cost is only paid in case node has used `setNativeProps` before. Reviewed By: mdvacca Differential Revision: D41875413 fbshipit-source-id: 453a5f7612a6f86a4cece269b13bd2ffd0c0e2d1