render() {
return (
<>
<h1>News Updater - for daily updates</h1>
<div className='my-4 mx-4'>
<div className="row">
{this.state.articles.map((element)=>{
return <div className="col-md-3" key={element.url}>
<NewsItem title={element.title?element.title.slice(0,40):""} description={element.description?element.description.slice(0,80):""} imageUrl={element.urlToImage} newsUrl={element.url} />
</div>
})}
</div>
<div className="container d-flex justify-content-around my-3 ">
<button type="button" disabled={this.state.page<=1} className="btn btn-outline-warning" onClick={this.handleBackClick}>« Back</button>
<button type="button" className="btn btn-outline-warning" onClick={this.handleNextClick}>Next »</button>
</div>
</div>
</>
)
}
}
using news api but its showing error button is not working(next button)