Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
thecrypticace authored and RobinMalfait committed Apr 12, 2024
1 parent 953bbb1 commit 6c259a1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/@headlessui-react/src/components/tabs/tabs.tsx
Expand Up @@ -568,7 +568,14 @@ function PanelFn<TTag extends ElementType = typeof DEFAULT_PANEL_TAG>(

useIsoMorphicEffect(
() => actions.registerPanel(internalPanelRef),
[actions, internalPanelRef, id]
[
actions,
internalPanelRef,

// The `id` prop is here to force a re-render of the
// corresponding `Tab` whenever the `id` is calculated in React < 18
id,
]
)

let mySSRIndex = useStableCollectionIndex('panels')
Expand Down

0 comments on commit 6c259a1

Please sign in to comment.