I dont understand Next 13
Answered
Large garden bumble bee posted this in #help-forum
Large garden bumble beeOP
hey maybe not the right place, but I have come to some issues.
Now I am no expert, I just do some web app dev for challenging purposes and I just came back to Next.js and found out that a lot of things have changed.
Like for example from the most simplest stuff like useState now needs a 'use client' at the top of the file to function. Why is that neccesary?
Now I am no expert, I just do some web app dev for challenging purposes and I just came back to Next.js and found out that a lot of things have changed.
Like for example from the most simplest stuff like useState now needs a 'use client' at the top of the file to function. Why is that neccesary?
Answered by fuma
Don't sure if you have already read the new docs, but I would recommend you read this:
https://nextjs.org/docs/getting-started/react-essentials
Next.js now collaborates with React Server Component and created App Router as an alternative to the old Pages Router. RSC is a new model that renders a component fully on the server, allowing to ship zero javascript and have lot of performance benefits.
The "use client" directive is used to mark that file to a client component, which means it will be shipped to the client. Don't worry, client components are still pre-rendered on the server just like how they used to be on Pages Router. If you want to know more, please refer to the docs.
Feel free to ask questions here if there's anything you don't understand
https://nextjs.org/docs/getting-started/react-essentials
Next.js now collaborates with React Server Component and created App Router as an alternative to the old Pages Router. RSC is a new model that renders a component fully on the server, allowing to ship zero javascript and have lot of performance benefits.
The "use client" directive is used to mark that file to a client component, which means it will be shipped to the client. Don't worry, client components are still pre-rendered on the server just like how they used to be on Pages Router. If you want to know more, please refer to the docs.
Feel free to ask questions here if there's anything you don't understand

12 Replies
@Large garden bumble bee hey maybe not the right place, but I have come to some issues.
Now I am no expert, I just do some web app dev for challenging purposes and I just came back to Next.js and found out that a lot of things have changed.
Like for example from the most simplest stuff like useState now needs a 'use client' at the top of the file to function. Why is that neccesary?
Don't sure if you have already read the new docs, but I would recommend you read this:
https://nextjs.org/docs/getting-started/react-essentials
Next.js now collaborates with React Server Component and created App Router as an alternative to the old Pages Router. RSC is a new model that renders a component fully on the server, allowing to ship zero javascript and have lot of performance benefits.
The "use client" directive is used to mark that file to a client component, which means it will be shipped to the client. Don't worry, client components are still pre-rendered on the server just like how they used to be on Pages Router. If you want to know more, please refer to the docs.
Feel free to ask questions here if there's anything you don't understand
https://nextjs.org/docs/getting-started/react-essentials
Next.js now collaborates with React Server Component and created App Router as an alternative to the old Pages Router. RSC is a new model that renders a component fully on the server, allowing to ship zero javascript and have lot of performance benefits.
The "use client" directive is used to mark that file to a client component, which means it will be shipped to the client. Don't worry, client components are still pre-rendered on the server just like how they used to be on Pages Router. If you want to know more, please refer to the docs.
Feel free to ask questions here if there's anything you don't understand

Answer
Large garden bumble beeOP
Well I need to read up a bit, for I am clearly outdated, but I am trying to very basic stuff like Linking to a page and the links wont function even if I make the lets say "about page" "about.js" file. The <Link > will be there, but it rejects file. It only shows 404 error
Because the file structure is no longer the same
Large garden bumble beeOP
Yeah figures
Basically, almost all the concepts in Next.js Pages Router are different from the new one, despite client-side things like <Link> or <Image>.
Large garden bumble beeOP
well thanks I need to read a bit now. I tried to find some tutorials, but there is barely any on Next 13.
Thank you for helping
Currently, I think the best place to learn Next.js is still their docs
from Routing, Metadata to Data Fetching
Large garden bumble beeOP
Your right, I just am too custom to see things work then to read about it I guess
Yea, I understand how it feels like.
Btw you can mark my answer as the solution if your question has been solved as well.
Btw you can mark my answer as the solution if your question has been solved as well.