I want to enable pagination in my elasticsearch results by adding new page of results below the older one in React Js I want to enable pagination in my elasticsearch results by adding new page of results below the older one in React Js elasticsearch elasticsearch

I want to enable pagination in my elasticsearch results by adding new page of results below the older one in React Js


Inside your esFunction, you could try something like this:

let oldState = this.state.results.slice();body.hits.hits.forEach(function (searchResult) {    oldState.push(searchResult)    });this.setState({    results: oldState});

There is a SO post that talks about this topic.More details at Facebook React page.