Theo's Typesafe CultTTC
Theo's Typesafe Cult2y ago
2 replies
Sz

What exactly does `unstable_noStore` do?

I'm developing on the t3 stack with clerk as the auth. When I try to call one of my protected endpoints, I get the following error when building
[cause]: a [Error]: Dynamic server usage: Page couldn't be rendered statically because it used `headers`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error


I don't really understand why this error occurs when only the
auth
method is being used from Clerk in the trpc context, but using unstable_nostore in the components that do call the endpoints, fixes this issue.

Does anyone know what exactly is going on here?
Was this page helpful?