flowbite-react icon indicating copy to clipboard operation
flowbite-react copied to clipboard

No Server Component Support in React / Next 13?

Open AlexW301 opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. I can not seem to use react server components with next 13 when using the flowbite react library. When using a simple button component I get this error.

"You're importing a component that needs flushSync. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default."

Describe the solution you'd like Support for server components, theres no need to not be able to use server components when using something as simple as a button.

AlexW301 avatar Jan 19 '23 20:01 AlexW301

Hey @rluders @tulup-conner,

Can you please check this out? Recently I've made an update to the main library to support SSR rendering by adding a check flag for the window object.

Cheers, Zoltan

zoltanszogyenyi avatar Jan 20 '23 12:01 zoltanszogyenyi

I'm closing this on 'cause, this is duplicated with #448 - check the comments, I added a note there.

rluders avatar Jan 20 '23 13:01 rluders