diff --git a/Libraries/Components/Picker/PickerAndroid.android.js b/Libraries/Components/Picker/PickerAndroid.android.js index 03f729709..a21463683 100644 --- a/Libraries/Components/Picker/PickerAndroid.android.js +++ b/Libraries/Components/Picker/PickerAndroid.android.js @@ -52,7 +52,7 @@ class PickerAndroid extends React.Component { static propTypes = { ...ViewPropTypes, style: pickerStyleType, - selectedValue: React.PropTypes.any, + selectedValue: ReactPropTypes.any, enabled: ReactPropTypes.bool, mode: ReactPropTypes.oneOf(['dialog', 'dropdown']), onValueChange: ReactPropTypes.func, diff --git a/Libraries/ReactNative/AppContainer.js b/Libraries/ReactNative/AppContainer.js index 34def83c5..8b739ee9f 100644 --- a/Libraries/ReactNative/AppContainer.js +++ b/Libraries/ReactNative/AppContainer.js @@ -13,6 +13,7 @@ 'use strict'; const EmitterSubscription = require('EmitterSubscription'); +const PropTypes = require('prop-types'); const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter'); const React = require('React'); const ReactNative = require('ReactNative'); @@ -41,7 +42,7 @@ class AppContainer extends React.Component { _subscription: ?EmitterSubscription = null; static childContextTypes = { - rootTag: React.PropTypes.number, + rootTag: PropTypes.number, }; getChildContext(): Context { diff --git a/docs/NativeComponentsAndroid.md b/docs/NativeComponentsAndroid.md index c32622d44..39eca1cc4 100644 --- a/docs/NativeComponentsAndroid.md +++ b/docs/NativeComponentsAndroid.md @@ -107,7 +107,7 @@ The very final step is to create the JavaScript module that defines the interfac ```js // ImageView.js -import { PropTypes } from 'react'; +import PropTypes from 'prop-types'; import { requireNativeComponent, View } from 'react-native'; var iface = { @@ -168,7 +168,7 @@ MyCustomView.propTypes = { /** * Callback that is called continuously when the user is dragging the map. */ - onChangeMessage: React.PropTypes.func, + onChangeMessage: PropTypes.func, ... }; diff --git a/docs/NativeComponentsIOS.md b/docs/NativeComponentsIOS.md index b66fb324c..fd9f77a1c 100644 --- a/docs/NativeComponentsIOS.md +++ b/docs/NativeComponentsIOS.md @@ -84,6 +84,7 @@ This isn't very well documented though - in order to know what properties are av ```javascript // MapView.js +import PropTypes from 'prop-types'; import React from 'react'; import { requireNativeComponent } from 'react-native'; @@ -101,7 +102,7 @@ MapView.propTypes = { * angle is ignored and the map is always displayed as if the user * is looking straight down onto it. */ - pitchEnabled: React.PropTypes.bool, + pitchEnabled: PropTypes.bool, }; var RNTMap = requireNativeComponent('RNTMap', MapView); @@ -177,7 +178,7 @@ MapView.propTypes = { * angle is ignored and the map is always displayed as if the user * is looking straight down onto it. */ - pitchEnabled: React.PropTypes.bool, + pitchEnabled: PropTypes.bool, /** * The region to be displayed by the map. @@ -185,19 +186,19 @@ MapView.propTypes = { * The region is defined by the center coordinates and the span of * coordinates to display. */ - region: React.PropTypes.shape({ + region: PropTypes.shape({ /** * Coordinates for the center of the map. */ - latitude: React.PropTypes.number.isRequired, - longitude: React.PropTypes.number.isRequired, + latitude: PropTypes.number.isRequired, + longitude: PropTypes.number.isRequired, /** * Distance between the minimum and the maximum latitude/longitude * to be displayed. */ - latitudeDelta: React.PropTypes.number.isRequired, - longitudeDelta: React.PropTypes.number.isRequired, + latitudeDelta: PropTypes.number.isRequired, + longitudeDelta: PropTypes.number.isRequired, }), }; @@ -323,7 +324,7 @@ MapView.propTypes = { /** * Callback that is called continuously when the user is dragging the map. */ - onChange: React.PropTypes.func, + onChange: PropTypes.func, ... };