Repository navigation
Conversation
Generated by 🚫 dangerJS |
| becameResponderWhileAnimating: boolean, | ||
| }; | ||
| type Event = Object; | ||
| type Event = $ReadOnly<{| |
There was a problem hiding this comment.
Is SyntheticEvent from CoreEventTypes helpful here?
Also, are we sure this shouldn't be ScrollEvent from CoreEventTypes? Where do you see that this event contains touches?
There was a problem hiding this comment.
In response to your review, I changed PR a lot.
I found that the event defined by the existing flow type is getting passed in the arguments of all the functions defined in ScrollResponder, so we don't need to use SysntheticEvent here.
|
|
||
| scrollResponderTextInputFocusError: function(e: Event) { | ||
| console.error('Error measuring text field: ', e); | ||
| scrollResponderTextInputFocusError: function(msg: string) { |
There was a problem hiding this comment.
Was this function always being called with a string?
There was a problem hiding this comment.
Yes, the function is finally passed to UIManager.measureLayout as error callback.
In Java, the error callback argument is string, and in Objective-C, the callback is never called.
ref:
facebook-github-bot
left a comment
There was a problem hiding this comment.
@RSNara has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Related to react#22100 Enhance Flow types for Libraries/Components/ScrollResponder.js Pull Request resolved: react#22181 Reviewed By: TheSavior Differential Revision: D13032699 Pulled By: RSNara fbshipit-source-id: ca0ce178a96008a71016d033ee1154ad807d6599
Related to #22100
Enhance Flow types for Libraries/Components/ScrollResponder.js
Test Plan:
Changelog:
[GENERAL] [ENHANCEMENT] [ScrollResponder.js] - Flow types