How to tell Yoga to update layout from native Fabric component size #1789

Open
opened 2025-02-21 14:39:53 -08:00 by jdesgagne-onemedical · 0 comments
jdesgagne-onemedical commented 2025-02-21 14:39:53 -08:00 (Migrated from github.com)

I've been trying to build a fabric native component and have it layout without requiring manual sizing from react, but I'm not able to find example or solution for this problem. I tried manually updating the frame of the contentView, but yoga seems to ignore it. React will render it, but next elements position will be 0,0.

Take this example for example https://github.com/reactwg/react-native-new-architecture/blob/main/docs/fabric-native-components.md, how would one modify it to not have a specific height in react and instead infer it from its children sizing ?

I've been trying to build a fabric native component and have it layout without requiring manual sizing from react, but I'm not able to find example or solution for this problem. I tried manually updating the frame of the contentView, but yoga seems to ignore it. React will render it, but next elements position will be 0,0. Take this example for example https://github.com/reactwg/react-native-new-architecture/blob/main/docs/fabric-native-components.md, how would one modify it to not have a specific height in react and instead infer it from its children sizing ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#1789
No description provided.