Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example of server components with next 13? #816

Open
Sebasssssss opened this issue Feb 9, 2023 Discussed in #815 · 2 comments
Open

example of server components with next 13? #816

Sebasssssss opened this issue Feb 9, 2023 Discussed in #815 · 2 comments

Comments

@Sebasssssss
Copy link

Hello, I'm learning Next 13 and a bit confused on how to use geist with the new app experimental dir of Next 13. Is there any example on how layout.js should look? Because in order to use geist server side components with previous next versions, you had to change _document.js, but with this version there is not _document.js (as far as i know), instead there is layout.js. Maybe is very similar but i dont understand it very well yet

@dopecoder
Copy link

dopecoder commented Feb 28, 2023

With the new changes in Next.js 13, there is no way to pass the data through Layout Components. To migrate providers in _app.tsx/ts/js, you can follow this guide Link. Another thing to keep in mind is that all the components in geist-ui will be Client Components so all these components would need to have a page directive of 'use client'; otherwise, you will have to create a wrapping component and add the 'use client' directive yourself to make sure to not make the whole app a client application.

@SuperManfred
Copy link

SuperManfred commented Mar 15, 2023

hey @Sebasssssss @dopecoder I got this working but getting a nasty white screen Flash of inAccurate coloR Theme (FART) ---> if either of you can fix please comment here or PR changes 👍 https://github.com/SuperManfred/geist-ui-cna-experimental-app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants