You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stylisPluginRSC not working on Nextjs navigations #5838
Thanks for the report. I can't reproduce this yet. Nested StyleSheetManagers inherit the parent's stylisPlugins from 6.4.0, and a test with an outer manager using stylisPluginRSC and an inner one using sheet passes on 6.6.0.
To narrow it down, could you share:
the exact styled-components and Next.js versions
where your registry component and your styled components live (server components or 'use client' files)
a minimal repro, if you can
One guess: the registry runs in the client layer, where the plugin passed by the server-side manager doesn't reach it. As a workaround, try passing the plugin inside the registry component:
changed the title [-]stylisPluginRSC not working when StyledComponentsRegistry is inside[/-][+]stylisPluginRSC not working on Nextjs navigations[/+]on Oct 17, 2026
Activity
pullfrog commentedon Oct 16, 2026
quantizor commentedon Oct 16, 2026
Thanks for the report. I can't reproduce this yet. Nested StyleSheetManagers inherit the parent's
stylisPluginsfrom 6.4.0, and a test with an outer manager usingstylisPluginRSCand an inner one usingsheetpasses on 6.6.0.To narrow it down, could you share:
'use client'files)One guess: the registry runs in the client layer, where the plugin passed by the server-side manager doesn't reach it. As a workaround, try passing the plugin inside the registry component:
Let me know whether that helps.
laurenskling commentedon Oct 16, 2026
Small update: it only happens on navigations. Directly opening the page works. So it's something with the injected
styletags on navigations.6.6.0 on Next "^16.3.0"
But I've seen this in trying to upgrade before. So it was in 6.4/6.5 too I guess.
I use both server SCs and client SCs. I don't see how I can work around my
styled.buttonwith an onClick (making it mandatory to use client)adding the plugin to the registry component doesn't help.
[-]stylisPluginRSC not working when StyledComponentsRegistry is inside[/-][+]stylisPluginRSC not working on Nextjs navigations[/+]laurenskling commentedon Oct 17, 2026
Edited my report. It's not about the registry at all. I was just opening new links in new tabs making them work as a false positive.
it's fully about navigations.
quantizor commentedon Nov 6, 2026
@laurenskling I decided to introduce a new API for this, see #5865
It'll be available in the next pre-release which should go out in like 10 mins or so.
Feedback appreciated!
laurenskling commentedon Nov 9, 2026
Seems to be working fine!
Just to be sure, this means i would no longer have to wrap my code in
<StyleSheetManager stylisPlugins={[stylisPluginRSC]}>, right?quantizor commentedon Nov 9, 2026
Correct, you only need to use it if you want to override a particular subtree.
I'll be pushing some more 6.x prerelease changes soon too, stay tuned!
quantizor commentedon Nov 25, 2026
6.7 is now out!