react中state和props 遇到的问题

在React中希望使用一个组件获得props的属性,并遍历在li中 错误代码: 报错信息: data为undefine 改正后的代码: 直接在render里获取props数据 class InputList extends React. Component { constructor( props, context) { super( props, context); } render() { c
相关文章
相关标签/搜索