Closed tomelliot closed 1 year ago
The component must be used in a "use client"
because it uses react hooks (which only work on the client side).
The solution I proposed in the readme is to create a "use client"
provider that you add to your layout.tsx, without having to put "use client"
in your layout.tsx.
I hope I was able to answer your question.
Oh I see - I misunderstood your documentation here, my bad. I just made a little PR if you're open to suggestions.
More of a question than an issue - is there a reason to make the whole layout.tsx ? That seems to defeat the purpose of NextJS's server side rendering.
"use client"
, rather than just theI've embedded the progress bar in a component, which is marked
"use client"
and then imported into the layout.tsx, so the layout can stay server side. It seems to be working - any reasons why that wouldn't work?