Cannot make react context work during SSR
I made a simple ThemeContext, I have a providers file which is loading all the providers.
In a component I'm trying to call my
useTheme
hook.
I'm getting this error whenever a route is having a call to useTheme
on server side, on client side it works.
Not sure what I'm missing.6 Replies
sensitive-blue•5h ago
can you please provide a complete project?
fascinating-indigoOP•5h ago
no, it's a private project at work
sensitive-blue•4h ago
then create a minimal example based on one of our examples
fascinating-indigoOP•4h ago
GitHub
GitHub - wintercounter/repro-ts-start-provider-issue: Created with ...
Created with CodeSandbox. Contribute to wintercounter/repro-ts-start-provider-issue development by creating an account on GitHub.
fascinating-indigoOP•4h ago
here you go
created a
test
route
it's also happening with itfascinating-indigoOP•4h ago
