Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
thecrypticace committed Dec 15, 2023
1 parent d89939a commit 9036455
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/@headlessui-react/src/components/tabs/tabs.tsx
Original file line number Diff line number Diff line change
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 9036455

Please sign in to comment.