Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the import * as React from 'react' pattern #2242

Merged
merged 2 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/@headlessui-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix SSR tab hydration when using Strict Mode in development ([#2231](https://github.com/tailwindlabs/headlessui/pull/2231))
- Don't break overflow when multiple dialogs are open at the same time ([#2215](https://github.com/tailwindlabs/headlessui/pull/2215))
- Fix "This `Suspense` boundary received an update before it finished hydrating" error in the `Disclosure` component ([#2238](https://github.com/tailwindlabs/headlessui/pull/2238))
- Use the `import * as React from 'react'` pattern ([#2242](https://github.com/tailwindlabs/headlessui/pull/2242))

## [1.7.8] - 2023-01-27

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
Fragment,
createContext,
createRef,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
createContext,
useContext,
useMemo,
Expand Down
3 changes: 2 additions & 1 deletion packages/@headlessui-react/src/components/dialog/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/
import React, {
import * as React from 'react'
import {
createContext,
createRef,
useContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/
import React, {
import * as React from 'react'
import {
Fragment,
createContext,
useContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
useEffect,
useRef,

Expand Down
3 changes: 2 additions & 1 deletion packages/@headlessui-react/src/components/label/label.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
createContext,
useContext,
useMemo,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
Fragment,
createContext,
createRef,
Expand Down
3 changes: 2 additions & 1 deletion packages/@headlessui-react/src/components/menu/menu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/
import React, {
import * as React from 'react'
import {
Fragment,
createContext,
createRef,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
createContext,
createRef,
useContext,
Expand Down
3 changes: 2 additions & 1 deletion packages/@headlessui-react/src/components/portal/portal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
Fragment,
createContext,
useContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
createContext,
useContext,
useMemo,
Expand Down
3 changes: 2 additions & 1 deletion packages/@headlessui-react/src/components/switch/switch.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
Fragment,
createContext,
useContext,
Expand Down
3 changes: 2 additions & 1 deletion packages/@headlessui-react/src/components/tabs/tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
Fragment,
createContext,
useContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
Fragment,
createContext,
useContext,
Expand Down
2 changes: 1 addition & 1 deletion packages/@headlessui-react/src/hooks/use-event.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { useLatestValue } from './use-latest-value'

export let useEvent =
Expand Down
2 changes: 1 addition & 1 deletion packages/@headlessui-react/src/hooks/use-id.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'
import { useIsoMorphicEffect } from './use-iso-morphic-effect'
import { useServerHandoffComplete } from './use-server-handoff-complete'
import { env } from '../utils/env'
Expand Down
3 changes: 2 additions & 1 deletion packages/@headlessui-react/src/internal/focus-sentinel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState, FocusEvent as ReactFocusEvent } from 'react'
import * as React from 'react'
import { useState, FocusEvent as ReactFocusEvent } from 'react'

import { Hidden, Features } from './hidden'

Expand Down
3 changes: 2 additions & 1 deletion packages/@headlessui-react/src/internal/open-closed.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
createContext,
useContext,

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
createContext,
useContext,

Expand Down
3 changes: 2 additions & 1 deletion packages/@headlessui-react/src/internal/stack-context.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {
import * as React from 'react'
import {
createContext,
useContext,

Expand Down
2 changes: 1 addition & 1 deletion packages/@headlessui-react/src/utils/start-transition.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import * as React from 'react'

export let startTransition =
// Prefer React's `startTransition` if it's available.
Expand Down