If you use a ternary condition to return a null instead of a Tab react-tabs you get a "Uncaught TypeError: Cannot read property 'ref' of null".
Example
<div>
<Tabs>
{ shouldShowTabA ? <Tab>Tab A</Tab> : null }
{ shouldShowTabB ? <Tab>Tab B</Tab> : null }
</Tabs>
{ shouldShowTabA ? <TabPanel>{contentForA}</TabPanel> : null }
{ shouldShowTabB ? <TabPanel>{contentForB}</TabPanel> : null }
</div>
The assumption here is of course that at least one of the tabs will be displayed. I am not sure what will happen if you don't define any Tab elements.
If you use a ternary condition to return a null instead of a Tab react-tabs you get a "Uncaught TypeError: Cannot read property 'ref' of null".
Example
The assumption here is of course that at least one of the tabs will be displayed. I am not sure what will happen if you don't define any Tab elements.