React adapter ยท console.warn
LatticeTabs: `tabs` changed (a label, a badg...
Printed by React adapter, prefixed [lattice], since 1.63.0.
Warnings reference › react.tabs.mountOnly.tabs
- Identifier
react.tabs.mountOnly.tabs- Raised by
- React adapter
- Since
- 1.63.0
What happened
The React component was handed a tabs array that is not the one it mounted with. The tabs module builds its strip from that array once and offers no method to repaint a label, a badge or a descriptor afterwards, so there is nothing for the component to apply. It deliberately does not rebuild: a rebuild would close the open tab and discard whatever state its content holds. An application that computes a badge in render hands a new array every render, which is the usual way to arrive here.
The fix
Decide which you meant. For a genuinely different strip, give the component a key that changes, so the rebuild is yours and visible. For a live badge, keep it in your own render through this component's tab.badge prop rather than expecting the strip to repaint itself.
The smallest fix
<LatticeTabs key={workspaceId} tabs={tabs} active={active} />
Reference
Covered in full at the API reference.