window.scrollTo(0,0);
控制隐藏显示
componentDidMount(){
this.props.changeHomeData()
this.bindEvent()
}
bindEvent(){
window.addEventListener("scroll",this.props.changeScrollTopShow)
}
}
immutable 可以配合PureComponent实现优化,相当与内置了shouldComponentUpdata.