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

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@empyrical
Copy link
Collaborator

empyrical commented Oct 9, 2018

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.

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

@empyrical empyrical requested a review from TheSavior Oct 9, 2018

});
const ProgressViewIOS = (
props: Props,
forwardedRef?: ?React.Ref<'RCTProgressView'>,

This comment has been minimized.

@TheSavior

TheSavior Oct 9, 2018

Member

I don't know if this is right.

This comment has been minimized.

@empyrical

empyrical Oct 9, 2018

Author Collaborator

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!

@RSNara RSNara changed the title ProgressViewIOS: Remove PropTypes and NativeEventsMixin, convert to functional component [NativeEventsMixin] ProgressViewIOS: Remove PropTypes and NativeEventsMixin, convert to functional component Oct 9, 2018

@facebook-github-bot
Copy link

facebook-github-bot left a comment

RSNara has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@RSNara

RSNara approved these changes Oct 11, 2018

Copy link
Contributor

RSNara left a comment

Looks good! 👌🏽

@RSNara RSNara changed the title [NativeEventsMixin] ProgressViewIOS: Remove PropTypes and NativeEventsMixin, convert to functional component [NativeMethodsMixin] ProgressViewIOS: Remove PropTypes and NativeMethodsMixin, convert to functional component Oct 11, 2018

@react-native-bot

This comment has been minimized.

Copy link
Collaborator

react-native-bot commented Oct 12, 2018

@empyrical merged commit 93e6ae1 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Oct 12, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.