父组件传值给子组件时只要文本框发生变化就会重新渲染render,我理解我会影响性能,记录下方法用这个生命周期
shouldComponentUpdate
的方法就可以解决子组件重复渲染的问题
shouldComponentUpdate(nextProps, nextState) { if(nextProps.content!==this.props.content){ return true }else{ return false } }