-
Hi, curious if is there a fabric way for updating the size of a node in the React tree? akin to UIManagerModule.updateNodeSize ? We have a use case where we are creating views natively in Android, but then need to update the React tree after getting the measurements. The behavior we are seeing is that the natively created view is not available in the shadow tree, and thus is exiting early without updating the size in React, in UIImplementation.updateNodeSize. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @joemun, yes, Fabric has an alternative to update the size of a node in the tree. |
Beta Was this translation helpful? Give feedback.
Hello @joemun,
yes, Fabric has an alternative to update the size of a node in the tree.
Fabric stores all this information in ShadowTree and you will have to subclass some classes to get this to work.
I recommend looking at how Modal in Fabric works.
Through C++ state update, Android will tell Fabric about size. Then Fabric will apply this size to corresponding Yoga node and position everything accordingly.