mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
Updated "how to define propTypes..."
Imported from new prop-types module.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user