Animated: Forward Ref to Component

Summary:
Changes `createAnimatedComponent` so that a `ref` assigned to an Animated component will now be forwarded to the internal component. Previously, a ref to the internal component was accessed using the `getNode` method. The `getNode` method is now deprecated and will return the same `ref` but show a deprecation error.

Changelog:
[General] [Changed] - Refs on an Animated component are now the internal component. The `getNode` call has been deprecated.

Reviewed By: TheSavior

Differential Revision: D18290474

fbshipit-source-id: 5849809583a17624a89071db8be1282a12caedf3
This commit is contained in:
Tim Yung
2019-11-03 18:02:00 -08:00
committed by Facebook Github Bot
parent 894ee72278
commit 66e72bb4e0
6 changed files with 310 additions and 316 deletions
@@ -27,7 +27,7 @@ exports[`LogBoxInspectorSourceMapStatus should render for failed 1`] = `
}
}
>
<AnimatedComponent
<ForwardRef(AnimatedComponentWrapper)
source={
Object {
"height": 16,
@@ -94,7 +94,7 @@ exports[`LogBoxInspectorSourceMapStatus should render for pending 1`] = `
}
}
>
<AnimatedComponent
<ForwardRef(AnimatedComponentWrapper)
source={
Object {
"height": 16,