Skip to content

Conversation

@rozele
Copy link
Contributor

@rozele rozele commented Dec 15, 2021

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

The Animated APIs support the attachment of value listeners for various use cases, but the current UI.Composition APIs do not accommodate this.

This change is functionally dependent on #9249, which introduces the option to run native animations on the UI thread via CompositionTarget::Rendering callbacks.

Resolves #4311

What

Extends the ValueAnimatedNode with a callback that is invoked after calling OnValueUpdated (this occurs in the rendering driver in #9249). The callback is wired up to the NativeAnimatedModule, which calls RCTDeviceEventEmitter.emit("onAnimatedValueUpdate", { value: X });.

Testing

Will attach before and after videos.

Microsoft Reviewers: Open in CodeFlow

@rozele rozele requested a review from a team as a code owner December 15, 2021 16:43
@ghost ghost added the Area: Animation label Dec 15, 2021
@rozele rozele changed the title [3/3] Adds NativeAnimated value listeners for rendering driven events [1/3] Adds NativeAnimated value listeners for rendering driven events Dec 15, 2021
@rozele rozele changed the title [1/3] Adds NativeAnimated value listeners for rendering driven events [NativeAnimated][1/3] Adds NativeAnimated value listeners for rendering driven events Dec 15, 2021
@rozele rozele changed the title [NativeAnimated][1/3] Adds NativeAnimated value listeners for rendering driven events [NativeAnimated][3/3] Adds NativeAnimated value listeners for rendering driven events Dec 15, 2021
@rozele
Copy link
Contributor Author

rozele commented Jun 17, 2022

Merged into #9249

@rozele rozele closed this Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Animated.Value cannot have a listener attatched to it

1 participant