If state is being passed to a component as props, and the component is inside a Tab.Pane, when the state changes it won't update its props.
It works only if I programmatically switch tab back and forth with a setTimeout of 250 (or manually obviously), which means the tab needs to be switched again to re-render the component (therefore get the updated state)
Strangely enough it's the same thing if instead of a state I use a store system as redux to pass the prop to the component.
I also tried to add mountOnEnter={true} unmountOnExit={true} to the Pane which btw are already set to the Tab.Container wrapping everything inside, but doesn't make any difference.
Steps to reproduce the behavior:
- Create a
useStateor a state store of some sort - Assign it to a component as prop
- Place the component inside a react-bootstrap
Tab.Pane - Try to change the state
- The component won't reflect the updated state/store
Version of react-bootstrap used: "react-bootstrap": "^1.5.0"
example of my Tab.Pane:
<Tab.Pane eventKey="items">
<ItemsList items={data} />
</Tab.Pane>