Repository navigation
Fix 'Invalid prop data-headlessui-state supplied to React.Fragment' warning - #3788
Merged
Merged
Conversation
In React 19, this `Component === Fragment` check was false for some
reason. Looking at them at runtime, shows this behavior in both React 18
and React 19
```ts
let x = <Fragment></Fragment> // Instance of a Fragment
let y = <></> // Instance of a Fragment
let z = Fragment // Fragment itself
console.log(x.type === Symbol.for('react.fragment')) // true
console.log(y.type === Symbol.for('react.fragment')) // true
console.log(z === Symbol.for('react.fragment')) // true
```
We could potentially keep forwarding the props in case you have:
```ts
<Menu>
<MenuButton>
<>
<>
<>
<>
<button>To here</button>
</>
</>
</>
</>
</MenuButton>
</Menu>
```
But we can do that in a followup PR _if_ it's needed...
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
RobinMalfait
enabled auto-merge (squash)
September 10, 2025 10:47
cesmarvin
pushed a commit
to scm-manager/scm-manager
that referenced
this pull request
Nov 6, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@headlessui/react](https://github.com/tailwindlabs/headlessui) ([source](https://github.com/tailwindlabs/headlessui/tree/HEAD/packages/@headlessui-react)) | [`2.2.7` β `2.2.10`](https://renovatebot.com/diffs/npm/@headlessui%2freact/2.2.7/2.2.10) |  |  | --- ### Release Notes <details> <summary>tailwindlabs/headlessui (@​headlessui/react)</summary> ### [`v2.2.10`](https://github.com/tailwindlabs/headlessui/blob/HEAD/packages/@​headlessui-react/CHANGELOG.md#2210---2026-04-07) [Compare Source](https://github.com/tailwindlabs/headlessui/compare/@headlessui/react@v2.2.9...@headlessui/react@v2.2.10) ##### Fixed - Donβt render `<Portal>` while hydrating ([#​3825](tailwindlabs/headlessui#3825)) - Fix passing props on `Fragment` error due to `Symbol(react.lazy)` ([#​3873](tailwindlabs/headlessui#3873)) ### [`v2.2.9`](https://github.com/tailwindlabs/headlessui/blob/HEAD/packages/@​headlessui-react/CHANGELOG.md#229---2025-09-25) [Compare Source](https://github.com/tailwindlabs/headlessui/compare/@headlessui/react@v2.2.8...@headlessui/react@v2.2.9) ##### Fixed - Improve focus management in shadow DOM roots ([#​3794](tailwindlabs/headlessui#3794)) - Don't accidentally open the `Combobox` when touching the `ComboboxButton` while dragging on mobile ([#​3795](tailwindlabs/headlessui#3795)) - Ensure sibling `Dialog` components are scrollable on mobile ([#​3796](tailwindlabs/headlessui#3796)) - Infer `Combobox` type based on `onChange` handler ([#​3798](tailwindlabs/headlessui#3798)) - Allow home/end key default behavior inside `ComboboxInput` when `Combobox` is closed ([#​3798](tailwindlabs/headlessui#3798)) - Ensure interacting with a `Dialog` on iOS works after interacting with a disallowed area ([#​3801](tailwindlabs/headlessui#3801)) - Freeze Listbox values as soon as a value is selected ([#​3802](tailwindlabs/headlessui#3802)) - Ensure refs are forwarded when freezing data ([#​3390](tailwindlabs/headlessui#3390)) - Do not serialize React components into form fields ([49e9e8e](tailwindlabs/headlessui@49e9e8e)) ### [`v2.2.8`](https://github.com/tailwindlabs/headlessui/blob/HEAD/packages/@​headlessui-react/CHANGELOG.md#228---2025-09-12) [Compare Source](https://github.com/tailwindlabs/headlessui/compare/@headlessui/react@v2.2.7...@headlessui/react@v2.2.8) ##### Fixed - Ensure we are not freezing data when the `static` prop is used ([#​3779](tailwindlabs/headlessui#3779)) - Ensure `onChange` types are contravariant instead of bivariant ([#​3781](tailwindlabs/headlessui#3781)) - Support `<summary>` as a focusable element inside `<details>` ([#​3389](tailwindlabs/headlessui#3389)) - Fix `Maximum update depth exceeded` crash when using `transition` prop ([#​3782](tailwindlabs/headlessui#3782)) - Ensure pressing `Tab` in the `ComboboxInput`, correctly syncs the input value ([#​3785](tailwindlabs/headlessui#3785)) - Ensure `--button-width` and `--input-width` have the latest value ([#​3786](tailwindlabs/headlessui#3786)) - Fix 'Invalid prop `data-headlessui-state` supplied to `React.Fragment`' warning ([#​3788](tailwindlabs/headlessui#3788)) - Ensure `element` in `ref` callback is always connected when rendering in a `Portal` ([#​3789](tailwindlabs/headlessui#3789)) - Ensure form state is up to date when using uncontrolled components ([#​3790](tailwindlabs/headlessui#3790)) - Ensure `data-open` on `ComboboxInput` is up to date ([#​3791](tailwindlabs/headlessui#3791)) - Ensure changing the `immediate` prop value on the `Combobox` component works as expected ([#​3792](tailwindlabs/headlessui#3792)) </details> --- ### Configuration π **Schedule**: (in timezone Europe/Berlin) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) π¦ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. π **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMy4xIiwidXBkYXRlZEluVmVyIjoiNDQuMTMuMSIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOltdfQ==-->
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue in React 19 where a warning is shown in the console:
This PR fixes that by doing 2 things:
Fragment. We were relying on identity, but will now also check the underlying symbol.Fragmenteither.Test plan
where we can't reproduce the warning)
Before:
After:
Fixes: #3597
Fixes: #3351