How to make Nextjs app styles global, so that they will not be updated ?
Unanswered
Cuvier’s Dwarf Caiman posted this in #help-forum
Cuvier’s Dwarf CaimanOP
Hi all, I'm having trouble understanding how "styled-components" work with Nextjs13 + ts.
When I go through pages or change the site theme my single style tag provided by styled-components is updated - and it makes the page twitchy.
I want to separate my global styles from the local styles that are used in components.
It's also important to know that my global styles, for example body { background-color } depends on the current theme (this is global.ts) but for example the font request I want to perform only once on the client side.
if you have any recommendations for the project, feel free to share*
my app: https://codesandbox.io/p/github/Te1m0z/blog-next
When I go through pages or change the site theme my single style tag provided by styled-components is updated - and it makes the page twitchy.
I want to separate my global styles from the local styles that are used in components.
It's also important to know that my global styles, for example body { background-color } depends on the current theme (this is global.ts) but for example the font request I want to perform only once on the client side.
if you have any recommendations for the project, feel free to share*
my app: https://codesandbox.io/p/github/Te1m0z/blog-next