the problem is with your render method, remember render should always return the component, you are just returning reference to the function ,so to over come you should make call to the function like
render() {
if(this.state.editing) {
return this.renderForm()
} else {
return this.renderDisplay()
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…