[NativeMethodsMixin] ProgressViewIOS: Remove PropTypes and NativeMethodsMixin, convert to functional component - #21588
Closed
empyrical wants to merge 2 commits into
Closed
[NativeMethodsMixin] ProgressViewIOS: Remove PropTypes and NativeMethodsMixin, convert to functional component#21588empyrical wants to merge 2 commits into
empyrical wants to merge 2 commits into
Conversation
…unctional component
elicwhite
reviewed
Oct 9, 2018
| }); | ||
| const ProgressViewIOS = ( | ||
| props: Props, | ||
| forwardedRef?: ?React.Ref<'RCTProgressView'>, |
Contributor
There was a problem hiding this comment.
I don't know if this is right.
Contributor
Author
There was a problem hiding this comment.
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!
facebook-github-bot
left a comment
Contributor
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.
Collaborator
|
@empyrical merged commit 93e6ae1 into |
t-nanava
pushed a commit
to microsoft/react-native-macos
that referenced
this pull request
Jun 17, 2019
…functional component (react#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: react#21588 Reviewed By: hramos Differential Revision: D10338888 Pulled By: RSNara fbshipit-source-id: c49807e97a0e2cf774971d9aa5a8426f15a3e48d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR converts
ProgressViewIOSfrom acreateReactClasscomponent to a functional component, and removes the remaining proptypes. Its use ofNativeMethodsMixinhas been ported to aforwardRefto 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