Skip to content

Error: useMediaQuery is a client-only hook #326

Open

Description

@yeasin2002

I'm using useMediaQuery hook from @uidotdev/usehooks. My parent component is a client component then this error also occurs.

⨯ Error: useMediaQuery is a client-only hook
at DashboardLayout (./src/app/dashboard/page.tsx:35:92)
digest: "2779910239"

Activity

  1. DohnalMichal commented on Jan 9, 2025

    @DohnalMichal

    There is an existing workaround. See #218 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions