mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
react@16 did away with PropTypes; require prop-types instead
Summary: react@16 (a peerDependency) did away with the PropTypes export in favor of the prop-types module. This updates all of the remaining references to `React.PropTypes`. Closes https://github.com/facebook/react-native/pull/14641 Differential Revision: D5287167 Pulled By: javache fbshipit-source-id: a917e29aa0e5470260568995dfe97f5528ec265e
This commit is contained in:
committed by
Mike Grabowski
parent
415fe90ff3
commit
dee6aab88a
@@ -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,
|
||||
...
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user