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

heroUI components require "use client" directives despite wrapping my root elements in providers.tsx and using "use client" directive there #4937

Open
Yaseenjabir opened this issue Feb 26, 2025 · 1 comment

Comments

@Yaseenjabir
Copy link

I manually setup heroUI with my Nextjs 15, and followed all the steps mentioned there. There they mentioned that you need to wrap your root component in providers.tsx and use "use client" directive there, I did the same but still I have to use "use client" every where I have to use any heroUI component. Below is my code:

/app/layout.tsx
`import { Providers } from "./providers";

{children} `

/app/providers.tsx
`
"use client";

import { HeroUIProvider } from "@heroui/react";

export function Providers({ children }: { children: React.ReactNode }) {
return {children};
}

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant