Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gesture responder binding issues causing errors in onResponderGrant. #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AndrewSouthpaw
Copy link

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 inside `onResponderGrant`. Binding the
methods to the instance fixes the issue.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant