I am trying react-bootstrap.
I want to paginate like that with the component Pagination here .
My code is :
<Pagination size="sm">
<Pagination.First />
<Pagination.Prev />
{ () => {for(let page=1;page<meta.last_page;page++){
return <Pagination.Item>{page}</Pagination.Item>
}}}
<Pagination.Next />
<Pagination.Last />
</Pagination>
I have this error :
Warning: Functions are not valid as a React child. This may happen if you return a Component instead of from render
How to loop to display the component Pagination ?