Skip to content

What's the migration path for setSize on the UIManager? #36

Answered by sammy-SC
grahammendick asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @grahammendick,

sorry for the slow response. I'm on a leave and rarely come to Github.

The tldr is: take a look at how ModalHostView component does it. Relevant files:

You might ask, why is it so complicated compared to the old architecture. The reason is that there may be several shadow nodes representing the same component view and imperative call to UIManager wouldn't work in such a case. We use React Native Rendered State Update to communicate the size change to Yoga and resize all affected nodes.

Let me know if anything is unclear.

Thank you

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@grahammendick
Comment options

grahammendick Jun 1, 2022
Collaborator Author

@grahammendick
Comment options

@grahammendick
Comment options

grahammendick Jul 3, 2022
Collaborator Author

Answer selected by grahammendick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants