Memoize tap GH state for sending proper value after releasing finger #478
+39
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Issue happens on iOS. #476.
After releasing finger in tap GH which is waiting for second GH and failure of second GH, values are being set zero and then zeros are send to JS instead on corrects values.
Changes
After reseting values are memoized and placed in nativeEvent. If this kind of situation is detected (no finger on screen) we fallback to memoized valued values instead of evaluating them.