Skip to content

Commit a08be96

Browse files
Add client hint to close provider (#3429)
This PR adds a missing client boundary in the close provider file that was causing crashes when used with Turbopack as reported in the Next.js repo: vercel/next.js#68205 ## Test plan Thanks to @richardasymmetric [fantastic repro](vercel/next.js#68205 ) I could check out the example repo and link a tarball build of the updated `@headlessui/react` package to validate that this is enough to resolve the issue. After this change, `next dev` and `next dev --turbo` work in the same way.
1 parent 2260422 commit a08be96

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/@headlessui-react/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Ensure `Transition` component state doesn't change when it becomes hidden ([#3372](https://github.com/tailwindlabs/headlessui/pull/3372))
1313
- Fix closing components using the `transition` prop, and after scrolling the page ([#3407](https://github.com/tailwindlabs/headlessui/pull/3407))
14+
- Ensure all client components are marked correctly to avoid a crash with React 19 and Turbopack ([#3429](https://github.com/tailwindlabs/headlessui/pull/3429))
1415

1516
## [2.1.2] - 2024-07-05
1617

packages/@headlessui-react/src/internal/close-provider.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client'
2+
13
import React, { createContext, useContext } from 'react'
24

35
let CloseContext = createContext(() => {})

0 commit comments

Comments
 (0)