Expose getNode() on component created with createAnimatedComponent #9944
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
see also: eb3360b#commitcomment-19042340
commit eb3360b recently break some third libraries that was (weakly) relying on traversing
animatedNode.refs.node
to get the original node of the decorated (animated) component (at least 2 libs: gl-react-native and react-native-material-kit).Instead of now doing
animatedNode._component
(that might later break again), getNode() is a more 'public' solution for these third party.as you expose a way to create an animated component (
createAnimatedComponent
) you sometimes still want a way to get the reference.That way, third party components can continue providing some extra native methods to the animated version.