Updated "how to define propTypes..."

Imported from new prop-types module.
This commit is contained in:
Gustavo Isensee
2017-06-13 00:59:43 -03:00
committed by GitHub
parent 00c9e52aec
commit 1bbac74286

View File

@@ -557,7 +557,8 @@
- How to define `propTypes`, `defaultProps`, `contextTypes`, etc...
```jsx
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
const propTypes = {
id: PropTypes.number.isRequired,