chore(prop-types-decorator): deprecate

This commit is contained in:
Julien Fontanet 2018-01-15 12:48:22 +01:00
parent 504895a730
commit d7f8d12d88

View File

@ -1,6 +1,18 @@
import assign from 'lodash/assign'
import PropTypes from 'prop-types'
// Deprecated because :
// - unnecessary
// - not standard in the React ecosystem
if (__DEV__) {
console.warn(`DEPRECATED: use prop-types directly:
class MyComponent extends React.Component {
static propTypes = {
foo: PropTypes.string.isRequired
}
}`)
}
// Decorators to help declaring properties and context types on React
// components without using the tedious static properties syntax.
//