Closed gaearon closed 1 hour ago
I recall there was an issue that if a component doesn't have its own native representation (it wraps a View for example) then we need to re-obtain the tag in some cases (when the underlying View changes). Not sure if it applies here however.
Summary
Partially addresses https://github.com/software-mansion/react-native-reanimated/issues/6719.
This is better because it doesn't enter the traversal codepath inside React. The
findNodeHandle
calculation inside theAnimated.View
itself is not so bad because it's short circuited inside for native refs (at least withView
). 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.