You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
感谢作者的教程,学起来很愉快。只是教程里评论总提示请文明用语。。。
学习lesson24这节的时候发现会有propTypes 的warning,查询后发现15.5后已经独立出来了
// After (15.5)
`import React from 'react';
import PropTypes from 'prop-types';
class Component extends React.Component {
render() {
return
感谢作者的教程,学起来很愉快。只是教程里评论总提示请文明用语。。。
学习lesson24这节的时候发现会有propTypes 的warning,查询后发现15.5后已经独立出来了
// After (15.5)
`import React from 'react';
import PropTypes from 'prop-types';
class Component extends React.Component {
render() {
return
}
}
Component.propTypes = {
text: PropTypes.string.isRequired,
};`
参考:https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.proptypes
The text was updated successfully, but these errors were encountered: