Skip to content

Use source shadow node state on clone #50773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

lenaic
Copy link

@lenaic lenaic commented Apr 16, 2025

Summary:
With shadow node syncing enabled by default, whenever a shadow node has to be cloned, we can be guaranteed that the state on the shadow node will be the most recent state in most cases.

This change fixes state updates being ignored when cloning YogaLayoutableShadowNodes from a commit hook. Since the most recent state gets updated post commit, any clone reading the most recent state might miss state changes done within the commit.

Changelog: [Internal]

Reviewed By: rshest, cipolleschi

Differential Revision: D72315898

Nick Lefever added 3 commits April 15, 2025 08:01
Differential Revision: D73038437
Summary:
With shadow node syncing enabled by default, whenever a shadow node has to be cloned, we can be guaranteed that the state on the shadow node will be the most recent state in most cases.

This change fixes state updates being ignored when cloning YogaLayoutableShadowNodes from a commit hook. Since the most recent state gets updated post commit, any clone reading the most recent state might miss state changes done within the commit.

Changelog: [Internal]

Reviewed By: rshest, cipolleschi

Differential Revision: D72315898
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Apr 16, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D72315898

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 96939f1.

uffoltzl pushed a commit to uffoltzl/react-native that referenced this pull request Apr 18, 2025
Summary:
Pull Request resolved: facebook#50773

With shadow node syncing enabled by default, whenever a shadow node has to be cloned, we can be guaranteed that the state on the shadow node will be the most recent state in most cases.

This change fixes state updates being ignored when cloning YogaLayoutableShadowNodes from a commit hook. Since the most recent state gets updated post commit, any clone reading the most recent state might miss state changes done within the commit.

Changelog: [Internal]

Reviewed By: rshest, cipolleschi

Differential Revision: D72315898

fbshipit-source-id: 5e14d03681dd1cc5686a649caa2e8c3685042cfa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants