Skip to content

Sync offset value to native immediately #50941

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 1 commit into from

Conversation

martinbooth
Copy link

Summary:
Without doing this, using Animated.event to update a value with an offset causes the value to revert to not having an offset because the native side doesn't even know about the offset if it hasn't been synced.

Don't think there's a better place to sync this for the cases where an animation is kicked off entirely from the native side

Changelog: [Android][Fixed] - Ensure latest offset value is synced to native

Reviewed By: javache

Differential Revision: D73622302

@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 25, 2025
@facebook-github-bot
Copy link
Contributor

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

martinbooth pushed a commit to martinbooth/react-native that referenced this pull request Apr 25, 2025
Summary:

Without doing this, using Animated.event to update a value with an offset causes the value to revert to not having an offset because the native side doesn't even know about the offset if it hasn't been synced.

Don't think there's a better place to sync this for the cases where an animation is kicked off entirely from the native side

Changelog: [Android][Fixed] - Ensure latest offset value is synced to native

Reviewed By: javache

Differential Revision: D73622302
@facebook-github-bot
Copy link
Contributor

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

martinbooth pushed a commit to martinbooth/react-native that referenced this pull request Apr 25, 2025
Summary:
Pull Request resolved: facebook#50941

Without doing this, using Animated.event to update a value with an offset causes the value to revert to not having an offset because the native side doesn't even know about the offset if it hasn't been synced.

Don't think there's a better place to sync this for the cases where an animation is kicked off entirely from the native side

Changelog: [Android][Fixed] - Ensure latest offset value is synced to native

Reviewed By: javache

Differential Revision: D73622302
martinbooth pushed a commit to martinbooth/react-native that referenced this pull request Apr 25, 2025
Summary:

Without doing this, using Animated.event to update a value with an offset causes the value to revert to not having an offset because the native side doesn't even know about the offset if it hasn't been synced.

Don't think there's a better place to sync this for the cases where an animation is kicked off entirely from the native side

Changelog: [Android][Fixed] - Ensure latest offset value is synced to native

Reviewed By: javache

Differential Revision: D73622302
@facebook-github-bot
Copy link
Contributor

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

martinbooth pushed a commit to martinbooth/react-native that referenced this pull request Apr 25, 2025
Summary:
Pull Request resolved: facebook#50941

Without doing this, using Animated.event to update a value with an offset causes the value to revert to not having an offset because the native side doesn't even know about the offset if it hasn't been synced.

Don't think there's a better place to sync this for the cases where an animation is kicked off entirely from the native side

Changelog: [Android][Fixed] - Ensure latest offset value is synced to native

Reviewed By: javache

Differential Revision: D73622302
@martinbooth martinbooth force-pushed the export-D73622302 branch 2 times, most recently from 360fa6e to 5cd6399 Compare April 28, 2025 16:30
martinbooth pushed a commit to martinbooth/react-native that referenced this pull request Apr 28, 2025
Summary:

Without doing this, using Animated.event to update a value with an offset causes the value to revert to not having an offset because the native side doesn't even know about the offset if it hasn't been synced.

Don't think there's a better place to sync this for the cases where an animation is kicked off entirely from the native side

Changelog: [Android][Fixed] - Ensure latest offset value is synced to native

Reviewed By: javache

Differential Revision: D73622302
Summary:
Pull Request resolved: facebook#50941

Without doing this, using Animated.event to update a value with an offset causes the value to revert to not having an offset because the native side doesn't even know about the offset if it hasn't been synced.

Don't think there's a better place to sync this for the cases where an animation is kicked off entirely from the native side

Changelog: [Android][Fixed] - Ensure latest offset value is synced to native

Reviewed By: javache

Differential Revision: D73622302
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3e3094c.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 28, 2025
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by Martin Booth in 3e3094c

When will my fix make it into a release? | How to file a pick request?

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.

3 participants