Accordion Fragment Error with React 19
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
I am receiving this error on the Accordion component after updating from React 18 to 19: "Invalid prop data-headlessui-state supplied to React.Fragment. React.Fragment can only have key and children props."
Gemini thinks that the issue is related to passing a fragment to the element, which is no longer allowed in React 19. https://github.com/USACE/groundwork/blob/main/lib/components/display/accordion.jsx.
I think the specific issue is on Line 24 "<>". Replacing the <></> with a
tag may fix the issue, or adding an as="div" to the Disclosure tag. I haven't tried either, however.REDACTED relevant log output
Steps to Reproduce
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/components/display/accordion.jsx, especially the fragment on line 24, and inspect how Accordion passes props to Disclosure under React 19. Reproduce the reported data-headlessui-state error, then verify the chosen fix by confirming the error no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100