diff --git a/apps/ssr-testing/app/document-context/child.tsx b/apps/ssr-testing/app/document-context/child.tsx new file mode 100644 index 000000000..70555b017 --- /dev/null +++ b/apps/ssr-testing/app/document-context/child.tsx @@ -0,0 +1,11 @@ +'use client'; +import * as React from 'react'; +import { DocumentContext } from 'radix-ui/internal'; + +export function Child() { + const document = DocumentContext.useDocument(); + React.useEffect(() => { + console.log(document); + }, [document]); + return
Open the console to see the document context.
; +} diff --git a/apps/ssr-testing/app/document-context/page.tsx b/apps/ssr-testing/app/document-context/page.tsx new file mode 100644 index 000000000..f73599ebf --- /dev/null +++ b/apps/ssr-testing/app/document-context/page.tsx @@ -0,0 +1,13 @@ +import * as React from 'react'; + +import { Parent } from './parent'; +import { Child } from './child'; + +export default function Page() { + return ( + = P & { __scopeTooltip?: Scope };
const [createTooltipContext, createTooltipScope] = createContextScope('Tooltip', [
@@ -77,7 +78,7 @@ const TooltipProvider: React.FC