Somehow the context is getting dropped some of the time, so that this becomes undefined inside ViewTransformer#onResponderGrant. Binding the methods to the instance fixes the issue.
We were seeing it inconsistently in production and could never repro the problem ourselves, but the errors went away once we added the binding.
It's unclear how it's only happening some of the time -- usually binding issues will become immediate apparent with React -- so my best guess is there's some detail inside the React Native system where the context can be dropped.
Somehow the context is getting dropped some of the time, so that
this
becomes undefined insideViewTransformer#onResponderGrant
. Binding the methods to the instance fixes the issue.We were seeing it inconsistently in production and could never repro the problem ourselves, but the errors went away once we added the binding.
It's unclear how it's only happening some of the time -- usually binding issues will become immediate apparent with React -- so my best guess is there's some detail inside the React Native system where the context can be dropped.