0
我想知道为什么我无法在反应功能中使用渲染器。下面的代码有错误。任何线索?渲染器无法在反应功能中使用
renderNewApplicants = (items) => {
let new_applicants = items.filter(obj =>
obj.applicants.result.is_new === true
)
render(){
return(//map new_applicants here)
}
}
然后在JSX别的地方我做{this.renderNewApplicants}
你不能叫'render'在此way.Use'setState'更新将CLL渲染你的状态。 https://facebook.github.io/react/docs/state-and-lifecycle.html –