Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <krzysztof.piaskowy@swmansion.com>
- Loading branch information