0
無限のスクロールロジックを実行しようとしていましたが、これはcomponentWillReceiveProps
で行いますが、リストが正しく表示されませんでしたか?新しい配列をcomponentWillReceivePropsの状態にマージする
componentWillReceiveProps(nextProps) {
if(!isEqual(nextProps.listItems, this.state.listItems)){ //user scrolled, call next offset using the API
this.setState({
listItems: this.state.listItems.push(...nextProps.listItems)
})
}
}