[bug] Styles not being applied in new nextjs apps
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Package Version
0.0.26
Current Behavior
Trying to render a simple <Box />
componenet does not inject styles in the ppage. Classes on dom nodes are added but not styles are not applied.
Expected Behavior
The components should be styled.
Steps To Reproduce
Code -
On stackblitz - does not work
On degen Playground - works
import { Box, Button } from 'degen'
export function Header() {
return (
<Box as='header' padding='16' backgroundColor='yellow'>
<Box padding='16' backgroundColor='black' color='white' fontFamily='mono'>
<Button>Hello World</Button>
</Box>
</Box>
)
}
Anything else?
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Styles not applied in first loading correctly with NextJS #30410
When using SX prop I seem to be getting an issue when deploying the application where a lot of the styles are loaded...
Read more >Next.js and Styled-Components: style loading issue
js app but can't get the styles to load properly? This is because the server-side rendering does not fetch the styles before rendering...
Read more >react-hydration-error - Next.js
In general this issue is caused by using a specific library or application code that is relying on something that could differ between...
Read more >Debugging Tailwind CSS and Next.js - LogRocket Blog
If you configure the content paths with Next the way you did with a React app, it will still not work. This is...
Read more >Tailwind CSS classes is not working in my project?
This error is due to tailwind not finding any classes to scan in what it 'thinks' is your HTML code directories.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@CodeAunt Refer to this stackbltz example. In your code you seem to have missed importing the styles
import 'degen/styles';
.ThemeProvider
is one of two imports.@CodeAunt Yeah, I realised that I never wrapped the app with the ThemeProvider