TypeError:无法读取属性' string'未定义的

时间:2018-05-06 02:37:41

标签: reactjs

import React, { Component } from 'react';
import PropType from 'prop-types'`
Counter.propTypes = {
caption: React.PropTypes.string.isRequired,
initValue: React.PropTypes.number.isRequired
};
Counter.defaultProps = {
caption: null,
initValue: 0
};

Cannot read property 'string' of undefined

0 个答案:

没有答案