作为一名编程老师,我曾看到过我的学生写出了这样的代码: render() { return ( <div> <h1>List of todos</h1> console.log(this.props.todos) </div> ); } 复制代码 这样写不会在控制台打印出期望的内容。而是在浏览器上渲染出 console.log(this.props.todos) 这...
作为一名编程老师,我曾看到过我的学生写出了这样的代码: render() { return ( <div> <h1>List of todos</h1> console.log(this.props.todos) </div> ); } 复制代码 这样写不会在控制台打印出期望的内容。而是在浏览器上渲染出 console.log(this.props.todos) 这...