Skip to content

Commit

Permalink
Revert "Use the import * as React from 'react' pattern (#2242)"
Browse files Browse the repository at this point in the history
This reverts commit 0276231.
  • Loading branch information
RobinMalfait committed Feb 6, 2023
1 parent fc908a1 commit d146b78
Show file tree
Hide file tree
Showing 22 changed files with 21 additions and 40 deletions.
1 change: 0 additions & 1 deletion packages/@headlessui-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ 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,5 +1,4 @@
import * as React from 'react'
import {
import React, {
Fragment,
createContext,
createRef,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
createContext,
useContext,
useMemo,
Expand Down
3 changes: 1 addition & 2 deletions packages/@headlessui-react/src/components/dialog/dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/
import * as React from 'react'
import {
import React, {
createContext,
createRef,
useContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/
import * as React from 'react'
import {
import React, {
Fragment,
createContext,
useContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
useEffect,
useRef,

Expand Down
3 changes: 1 addition & 2 deletions packages/@headlessui-react/src/components/label/label.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
createContext,
useContext,
useMemo,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
Fragment,
createContext,
createRef,
Expand Down
3 changes: 1 addition & 2 deletions packages/@headlessui-react/src/components/menu/menu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/
import * as React from 'react'
import {
import React, {
Fragment,
createContext,
createRef,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
createContext,
createRef,
useContext,
Expand Down
3 changes: 1 addition & 2 deletions packages/@headlessui-react/src/components/portal/portal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
Fragment,
createContext,
useContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
createContext,
useContext,
useMemo,
Expand Down
3 changes: 1 addition & 2 deletions packages/@headlessui-react/src/components/switch/switch.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
Fragment,
createContext,
useContext,
Expand Down
3 changes: 1 addition & 2 deletions packages/@headlessui-react/src/components/tabs/tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
Fragment,
createContext,
useContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
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 * as React from 'react'
import 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 * as React from 'react'
import 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: 1 addition & 2 deletions packages/@headlessui-react/src/internal/focus-sentinel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import { useState, FocusEvent as ReactFocusEvent } from 'react'
import React, { useState, FocusEvent as ReactFocusEvent } from 'react'

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

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

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

Expand Down
3 changes: 1 addition & 2 deletions packages/@headlessui-react/src/internal/stack-context.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import {
import React, {
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 * as React from 'react'
import React from 'react'

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

0 comments on commit d146b78

Please sign in to comment.