{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/21342","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/21342/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/21342/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/21342/events","html_url":"https://github.com/facebook/react-native/issues/21342","id":364254022,"node_id":"MDU6SXNzdWUzNjQyNTQwMjI=","number":21342,"title":"Removing propTypes from core components","user":{"login":"TheSavior","id":249164,"node_id":"MDQ6VXNlcjI0OTE2NA==","avatar_url":"https://avatars0.githubusercontent.com/u/249164?v=4","gravatar_id":"","url":"https://api.github.com/users/TheSavior","html_url":"https://github.com/TheSavior","followers_url":"https://api.github.com/users/TheSavior/followers","following_url":"https://api.github.com/users/TheSavior/following{/other_user}","gists_url":"https://api.github.com/users/TheSavior/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSavior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSavior/subscriptions","organizations_url":"https://api.github.com/users/TheSavior/orgs","repos_url":"https://api.github.com/users/TheSavior/repos","events_url":"https://api.github.com/users/TheSavior/events{/privacy}","received_events_url":"https://api.github.com/users/TheSavior/received_events","type":"User","site_admin":false},"labels":[{"id":257498156,"node_id":"MDU6TGFiZWwyNTc0OTgxNTY=","url":"https://api.github.com/repos/facebook/react-native/labels/:large_blue_diamond:JavaScript","name":":large_blue_diamond:JavaScript","color":"bfd4f2","default":false},{"id":192797868,"node_id":"MDU6TGFiZWwxOTI3OTc4Njg=","url":"https://api.github.com/repos/facebook/react-native/labels/Good%20first%20issue","name":"Good first issue","color":"0052cc","default":false},{"id":267325512,"node_id":"MDU6TGFiZWwyNjczMjU1MTI=","url":"https://api.github.com/repos/facebook/react-native/labels/Help%20Wanted%20:octocat:","name":"Help Wanted :octocat:","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":35,"created_at":"2018-09-26T23:48:51Z","updated_at":"2018-10-16T16:21:30Z","closed_at":"2018-10-16T16:21:30Z","author_association":"MEMBER","body":"We have been using Flow for our components for a long while and have enjoyed much stricter type safety, enabling us to validate our code at compile time instead of with propTypes at runtime. We want to replace the remaining callsites of propTypes with Flow and deprecate the propType shapes exposed by React Native core. To do this, we need your help!\r\n\r\n*This is step 1 of our multi step goal. Step 2 can be [found here](https://github.com/facebook/react-native/issues/21485).*\r\n\r\nThere are two classes of things that need to happen to complete this work. The first step is removing references from propTypes in our core components. The following are the individual files that need to be converted / updated. Each file should be converted in its own PR and each file is about the size of a good first issue to learn and get familiar with a part of the React Native codebase. If you’d like to convert one, pick one from the list, comment on this issue that you are interested in converting it, and follow the tips in [@empyrical's comment for help](https://github.com/facebook/react-native/issues/21342#issuecomment-424907040) successfully updating that file.\r\n\r\n## Remove callsites from components:\r\n- [x] Libraries/Components/Button.js -> Delete PropTypes\r\n - [x] MaskedViewIOS.ios.js -> Delete PropTypes\r\n - [x] Picker/Picker.js -> Delete PropTypes\r\n - [x] PickerAndroid.android.js -> Delete PropTypes\r\n - [x] StaticRenderer.js -> Delete PropTypes\r\n - [x] StatusBar/StatusBar.js -> Delete PropTypes\r\n - [x] TabBarIOS/TabBarIOS.ios.js -> Delete PropTypes\r\n - [x] TabBarIOS/TabBarItemIOS.ios.js -> Convert to Flow Types\r\n - [x] ViewPagerAndroid.android.js -> Delete PropTypes\r\n - [x] IncrementalPresenter.js -> Delete PropTypes, leave contextTypes\r\n - [x] SwipeableFlatList.js -> Delete PropTypes\r\n - [x] SwipeableListView.js -> Delete PropTypes\r\n - [x] SwipeableQuickActions.js -> DeletePropTypes (style changed to ViewStyleProp)\r\n - [x] ElementProperties.js -> Delete PropTypes\r\n - [x] InspectorPanel -> Delete PropTypes\r\n - [x] InspectorOverlay.js -> Delete PropTypes\r\n - [x] SnapshotViewIOS.ios.js -> Delete PropTypes\r\n - [x] LinkingExample.js -> Convert to Flow Types\r\n - [x] RNTesterBlock.js -> Delete PropTypes, strengthen Flow Types\r\n - [x] RNTesterButton.js -> Delete PropTypes\r\n - [x] RNTesterPage.js -> Delete PropTypes\r\n - [x] Modal.js -> Convert to Flow Types, slightly bigger task\r\n - [x] IntegrationTestHarnessTest\r\n - [x] InputAccessoryView -> no propTypes, but flow types need to get cleaned up\r\n\r\n## Move and Rename custom `propType` definitions\r\nFor these, I think we should create a new folder, `react-native/Libraries/DeprecatedPropTypes`. Many of these files have both the Flow definition and the propTypes definition. \"Split\" means split these into two files, in the example of `EdgeInsetsPropType` it would mean having an `EdgeInsetsPropType.js` file that contains the commented flow types, and a `DeprecatedEdgeInsetsPropType.js` file inside the `DeprecatedPropTypes` folder. Eventually that folder will become the source for the new repo that we move out. \r\n - [x] Create a new folder at react-native/Libraries/DeprecatedPropTypes (should be done as part of one of the other tasks)\r\n - [x] DeprecatedViewPropTypes -> Move, comments to ViewPropTypes\r\n - [x] EdgeInsetsPropType -> Split\r\n - [x] PlatformViewPropTypes -> Move\r\n - [x] TVViewPropTypes -> Split\r\n - [x] StyleSheetPropType -> Move\r\n - [x] createStrictShapeTypeChecker -> Move\r\n - [x] ViewAccessibility -> Split (in progress)\r\n - [x] ViewStylePropTypes -> Move \r\n - [x] ImageProps -> Split (in progress)\r\n - [x] ImageSourcePropType -> Move\r\n - [x] ImageStylePropTypes -> Move\r\n - [x] TextPropTypes -> Move\r\n - [x] ColorPropType -> Move\r\n - [x] LayoutPropTypes -> Move, comments to StyleSheetTypes\r\n - [x] ShadowPropTypesIOS -> Move, comments to StyleSheetTypes\r\n - [x] TransformPropTypes -> Move, comments to StyleSheetTypes\r\n - [x] PointPropType -> Split"}}
{"actor":{"display_login":"TheSavior"}}