diff --git a/.gitignore b/.gitignore index 1277d176f..8d9e4d668 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ node_modules .env coverage +# storybook +/playground/storybook-static + # website /website-deploy-key /website-deploy-key.pub diff --git a/packages/auto-id/src/auto-id.ts b/packages/auto-id/src/auto-id.ts index 8fefcdfd0..c513bec49 100644 --- a/packages/auto-id/src/auto-id.ts +++ b/packages/auto-id/src/auto-id.ts @@ -87,15 +87,6 @@ function useId( function useId(): string | undefined; function useId(providedId?: number | string | undefined | null) { - // TODO: Remove error flag when updating internal deps to React 18. None of - // our tricks will play well with concurrent rendering anyway. - // @ts-expect-error - if (typeof React.useId === "function") { - // @ts-expect-error - let id = React.useId(providedId); - return providedId != null ? providedId : id; - } - // If this instance isn't part of the initial render, we don't have to do the // double render/patch-up dance. We can just generate the ID and return it. let initialId = providedId ?? (serverHandoffComplete ? genId() : null); diff --git a/playground/stories/window-size/basic.example.js b/playground/stories/window-size/basic.example.js index 9e26af56f..0cac4f5ea 100644 --- a/playground/stories/window-size/basic.example.js +++ b/playground/stories/window-size/basic.example.js @@ -1,5 +1,5 @@ import * as React from "react"; -import WindowSize from "@reach/window-size"; +import { WindowSize } from "@reach/window-size"; let name = "Basic"; diff --git a/playground/stories/window-size/basic.example.tsx b/playground/stories/window-size/basic.example.tsx index f24f7e12a..2df009ee6 100644 --- a/playground/stories/window-size/basic.example.tsx +++ b/playground/stories/window-size/basic.example.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import WindowSize from "@reach/window-size"; +import { WindowSize } from "@reach/window-size"; let name = "Basic (TS)"; diff --git a/website/src/pages/window-size.mdx b/website/src/pages/window-size.mdx index 09faa4029..ed998561b 100644 --- a/website/src/pages/window-size.mdx +++ b/website/src/pages/window-size.mdx @@ -28,7 +28,7 @@ yarn add @reach/window-size ``` ```js -import WindowSize, { useWindowSize } from "@reach/window-size"; +import { WindowSize, useWindowSize } from "@reach/window-size"; ``` ## Component API