-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[NativeMethodsMixin] ProgressViewIOS: Remove PropTypes and NativeMethodsMixin, convert to functional component #21588
Conversation
…unctional component
}); | ||
const ProgressViewIOS = ( | ||
props: Props, | ||
forwardedRef?: ?React.Ref<'RCTProgressView'>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the way the other components (like Text
) seem to do it - but I notice that View
does it a better way, so I updated it to do it the way View
does it. The other ones should be cleaned up too, perhaps!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSNara has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👌🏽
@empyrical merged commit 93e6ae1 into |
…functional component (facebook#21588) Summary: This PR converts `ProgressViewIOS` from a `createReactClass` component to a functional component, and removes the remaining proptypes. Its use of `NativeMethodsMixin` has been ported to a `forwardRef` to the native component. Pull Request resolved: facebook#21588 Reviewed By: hramos Differential Revision: D10338888 Pulled By: RSNara fbshipit-source-id: c49807e97a0e2cf774971d9aa5a8426f15a3e48d
This PR converts
ProgressViewIOS
from acreateReactClass
component to a functional component, and removes the remaining proptypes. Its use ofNativeMethodsMixin
has been ported to aforwardRef
to the native component.Test Plan:
I have used it in RNTester, and the example progress bars work fine.
Release Notes:
[GENERAL] [ENHANCEMENT] [Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js] - Remove PropTypes and NativeEventsMixin, convert to functional component