You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace findNodeHandle with reading _componentViewTag (#6720)
## Summary
Partially addresses
#6719.
This is better because it doesn't enter the traversal codepath inside
React. The `findNodeHandle` calculation inside the `Animated.View`
itself is not so bad because it's short circuited inside for native refs
(at least with `View`). Whereas passing a class instance like here
always triggers the slower path in React. Regardless, it's already
computed so why compute again?
## Test plan
I've added console logs in our app to verify whether
`animatedComponent._componentViewTag ===
findNodeHandle(animatedComponent)` and it always turned out true in the
cases I hit.
Not sure if there any cases where those could be different.
Co-authored-by: Krzysztof Piaskowy <[email protected]>
0 commit comments