Hello! - I have recently used NextJS with Graphic Walker (an alternative for Tableau visualizations) and after numerous hours I ended up concluding that the default CSR in NextJS does not seem to work as in theory. Graphic Walker needs browser global variable: window.document to render its components but when the application loads, the next error is triggered: ReferenceError: document is not defined - it seems like somehow NextJS is first trying to build components in the server even when no specifying getServerSideProps neither getStaticProps. Any thoughts? - Any workarounds?
#Client Side Rendering?
7 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
Client components are still prerendered server-side to ensure SEO. If you have 3rd party libraries that are incompatible with this you need to use next/dynamic and import them with the ssr flag set to false which enforces them to become truly client-side only.
Thank you @silk iron
✅ Success!
This question has been marked as answered! If you have any other questions, feel free to create another post
Jump to answer
[Click here](#1157062374696681513 message)
Where can I get knowledge about Client components are still prerendered server-side to ensure SEO. . Is it documented explicitly in the Next.js official? I got misconception that the Client components are rendered only on client-side.
There is nothing specifically to learn about that. It's just a fact. There isn't more to it.