Replies: 1 comment 2 replies
-
|
What is your problem? I'm using antd with next 13 and works perfectly. Inside app.jsx you must define the antd config provider, then just create pages and import components. That's all. Ssr is no nneded |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The docs show what code to use, but where does this code go if you are using the /pages folder in NextJS?
_app.tsx?
_document.tsx?
something else?
Also, do you need to use
dangerouslySetInnerHtml?Details
Currently,, I'm getting a flash of unstyled content (FOUC) for every page when I first navigate to a page of my website. Once the page re-renders with the correct styling, the website works as expected from then on (unless I force a page refresh). So, the FOUC problem seems to be an issue with CSS in JS not working properly with SSR in NextJS, but once the JS loads, the styling gets processed. I assume this is what "inline mode" and "whole export" are intended to solve.
I wanted to experiment with inline mode, but I'm confused where (which file) to put the code shown in the docs. The code seems to be generating an HTML file as a string, but my NextJS project does not have an HTML file anywhere. I do have an _app.tsx file and the NextJS docs mentions a _document.tsx file (which seems to create an HTML-like file), but it's not clear how the "inline mode" code would fit with either of these files.
I also checked the NextJS page in the docs, but that doesn't say anything about styling issues with SSR.
Beta Was this translation helpful? Give feedback.
All reactions