【发布时间】:2020-12-29 14:42:37
【问题描述】:
尝试设置实际的 propTypes。但是显示这样的错误
尝试导入错误:“FieldInputProps”未从“react-final-form”导出。
import { FieldInputProps, FieldMetaState } from 'react-final-form';
const TextInput = ({
input: { name, onChange, value, type = 'text', placeholder, ...restInput },
meta
}) => {
.....Some Component Functionality.....
};
TextInput.propTypes = {
input: FieldInputProps,
meta: FieldMetaState
}
不知道为什么会发生这种情况,如何解决?
【问题讨论】:
标签: reactjs react-proptypes react-final-form final-form