I am having some trouble while creating my pagination page using react-bootstrap. I am trying to apply condition for active but it is not working.
<Pagination.Item
// active={x+1===page}
active={false}
>
{x+1}
</Pagination.Item>
All pagination status is showing active on UI.
How can I apply condition on active.
2
Answers
Can you provide more details of the code
Looking at the bit of code you have provided, I have to surmise that
your component looks something like this..
If that is the case, you are missing a
key
property on the element. Something along the lines of this..The
key
needs to be a completely unique value, and is required so that react can keep track of the element in an array and render/update them as they change. Lack of akey
prop can lead to bugs when the component state or properties update.