From cf8dc89ee84d8602305b4e3b7d777dc288ae61cf Mon Sep 17 00:00:00 2001 From: Chris Lewis Date: Wed, 1 Nov 2017 19:14:03 -0700 Subject: [PATCH] Fix $FlowFixMes from TabBarIOS Summary: There are a number of $FlowFixMe statements in TarBarIOS.ios.js as a result of recent Flow upgrades introducing new errors/warnings. I had a stab at removing these statements and introducing what are hopefully sensible types. Only types were changed so `yarn flow` should be sufficient. [INTERNAL] [MINOR] [TarBarIOS] - |Fix $FlowFixMes| Closes https://github.com/facebook/react-native/pull/16365 Differential Revision: D6200713 Pulled By: TheSavior fbshipit-source-id: ecbd58d5831dd04250e794812ea03d202f777d12 --- .../Components/TabBarIOS/TabBarIOS.ios.js | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Libraries/Components/TabBarIOS/TabBarIOS.ios.js b/Libraries/Components/TabBarIOS/TabBarIOS.ios.js index 9922f10b0fa..c373bc57ac2 100644 --- a/Libraries/Components/TabBarIOS/TabBarIOS.ios.js +++ b/Libraries/Components/TabBarIOS/TabBarIOS.ios.js @@ -20,19 +20,22 @@ const ViewPropTypes = require('ViewPropTypes'); var requireNativeComponent = require('requireNativeComponent'); -class TabBarIOS extends React.Component<{ - style?: $FlowFixMe, - unselectedTintColor?: $FlowFixMe, - tintColor?: $FlowFixMe, - unselectedItemTintColor?: $FlowFixMe, - barTintColor?: $FlowFixMe, +import type {StyleObj} from 'StyleSheetTypes'; +import type {ViewProps} from 'ViewPropTypes'; + +class TabBarIOS extends React.Component { static Item = TabBarItemIOS; - // $FlowFixMe(>=0.41.0) static propTypes = { ...ViewPropTypes, style: ViewPropTypes.style, @@ -85,9 +88,7 @@ class TabBarIOS extends React.Component<{ barStyle={this.props.barStyle} itemPositioning={this.props.itemPositioning} translucent={this.props.translucent !== false}> - { - // $FlowFixMe found when converting React.createClass to ES6 - this.props.children} + {this.props.children} ); }