How NextJS REALLY Works
Вставка
- Опубліковано 8 жов 2022
- NextJS is probably the best way to build your next React application. There are few better ways to do full stack with Javascript. Hopefully this video helps you better understand why!
THANK YOU MIR FOR THE GRIND TO GET THIS OUT TODAY!!!
ALL MY CONTENT IS FILMED LIVE ON TWITCH AT / theo
ALL MY BEST MEMES ARE ON TWITTER FIRST / t3dotgg
ALL THE COOLEST PEOPLE ARE IN MY DISCORD t3.gg/discord
ALL MY VIDEOS ARE POSTED EARLY ON PATREON / t3dotgg
Everything else (instagram, tiktok, blog): t3.gg/links - Наука та технологія
As someone who’s been mildly critical of some of your videos, this video is spot on. I’m sick of explaining what you just explained here, and I’m going to direct people here from now on.
same
Yeah .. Im an SEO guy trying to explain how to deploy JS correctly ... this makes my work with engineering teams a lot easier ... thank you!
I love your style of explaining and you really seem to know what you are talking about, including all the other videos you made about next. You saved me probably tons of hours of research and I am really thankful for that!
You dropped this video at the perfect time! My team is starting a new application and we're considering nextjs and this was an awesome introduction :)
Loving the new production style of video editing Theo! Just the inclusion of a "Coming Up" section is a great addition!
I missed like half of this live video so glad the video came out, this might be a personal favorite
This is amazing depth and details. Right down my alley. I like your style. Thank you.
at this point of my development journey ( very new here , self taught 8 ish months in ) . your content is exactly what i needed, thank you!
it feels like this is a conversation/explanation that i would have or want to have when apart of a team. very much “in the field” vibes. helping tie in the knowledge of tools & how to think of developing with them !
stay safe. thanks again !
ty Theo, just what I needed since I've been playing with Next a lot these days.
Love the explanation about that! Thanks for clarifying!
Thanks a lot. So good to learn this things not by using documentation, but by watching nice UA-cam channel with a cup of tea :)
That is a beautiful explanation, thank you, Theo!
Thanks Theo!! I've been reluctant to adopt Next and other SSR tools because I didn't understand them. Now that I've heard your explanation I can see how cool Next is 👍
I was the same man, then I tried it and found out that it is actually kind of a wrapper around your React application which lets you render portions of it on the server. It can seem as a lot when you read or hear about it, but when you actually start building with it following the docs, it all makes sense and it's not nearly as complicated as I thought before. Having a kind of solid understanding of React helps though, you can then easily differentiate Next from React parts.
Hey Theo. Great video as always. Can you make a video regarding what libraries/ packages are you using at ping to solve problems that you faced?
This is absolutely important background-knowledge! Fantastic explanation! Thank you! 😀👍
You're an amazing person!
Great quality content
Amazing work, helped me fix small confusions
You explained it so easily. Thanks for the effort.
The intro music and clip-of-content before the explanation video starts is gold. You should start doing this again.
Really Love All Your Videos ❤️
Uff what an explanation! Really good video!
We needed a video like this 🙏
Awesome, would love the same for remix run!
We really need this for app router as well. Especially how navigation works!
Thanks for this. Will just send it to all my colleagues who are asking me over and over again why I almost always choose NextJS. The cons are no cons, as I can opt out easily but still getting all the benefits especially as you mentioned the f##!@# developer experience, live reload and the option to have everything without hacking it on my own.
Great video! You just earned a sub theo.
Amazing explanation 🔥🔥
The best lectures I've seen were given by professors using a blackboard. It just occurred to me that you archive the same greatness by using Excalidraw!
Amaizingly clear and useful content! Thanks a lot!
Very nice explanation, Thank you...!
Thank you for this!
What a gem of a video! Thanks for this.
Nice explanation. Thank you.
awesome video! Thanks 👍🏻
14:00 The card preview has been disabled for everyone since April 2022 because the styling of the validator was different from the actual website
Thanks for sharing! I suddenly started seeing this as well recently on my sites and was wondering what broke lol
This is super good to know thank you
This is soo good. Thanks !
One of the huge things that is overlooked with nextJs is the build tools
genius explanation, thanks!
Thanks for this helpful video.
Valuable content, thank you
The way I understood it is next js is aiming to do what Angular does. Thanks for the content.
No?
awesome video, wondering which software you use to record the screen and your face?
The sun is energy.
There is life on Earth.
This video slaps.
We all will pay taxes.
These are nothing but straight facts.
Great content Theo!
Great video as always! I’ve only been working as a software eng for two years, so I’m always listening to your VODs!
I was wondering if you could talk about mobile app development a bit more in depth (I saw your Code Wars working with Flutter, but I’d love to see you take a deep dive on React Native)
i watched this video when it first came out and again last night. got much more out of it after getting my hands dirty with Next
great video
You forgot to mention that because of nextjs's server we can also create a minimal backend api, which is extremely useful for small fullstack projects. It is also something that only nextjs has, comparing to vite and CRA.
Great job man!!
you deserve a Nobel Peace prize for this youtube channel
great explanation
Thanks for sharing, you have mentioned that when browser requests to next server, next will execute getServerSideProps and then react will use those props. However, we can use getStaticPaths function to serve all dynamic routes pre-rendered HTML in built time. In that case, when a user requests to next server, will next server execute some react or just sending the pre-rendered HTML in built time instead of runtime?
your videos are awesome❤
Good video editing
I think the video title should be "How SSR/SSG works?".
Also I would argue that a Next app is a multi-page application because the client still requests a new page when you visit a new route, it's just that the next router and hydration patterns makes it "feel like a SPA". It's not really a SPA.
Anyways good video.
It is an SPA.
_app only mounts once and handles all page routing so _app is the single page.
NextJs just handles it quite cleverly making everything seem less.
But you are right, the title of the video was confusing since I was expecting a deep dive into how the framework was built.
@@rico454 What you said is true and yes I think the terms are usually juggled around.
Although it looks like MDN defines a SPA as an application which loads a single document page and updates that document's body using javascript.
You can look it up.
AFAIK it's neither of those 2, it's a Hybrid react framework.
@@sidwebworks9871 Thats what i think of when I hear SPA as well. So I'm a bit confused still. If that's not how nextjs works, then its just a MPA, that becomes SPA after html is requested, why not just become a static page at this point ? Isn't being SPA the biggest selling point of... well single page applications ? Because it makes navigating through pages so much faster. But next loses that ability by requesting the server side rendered html at every route change.
I feel so dumb for not understanding the point of nextjs but im also still a beginner
@@sidwebworks9871 Maybe I’m confused but doesn’t Next adhere to that criteria? _app is loaded once and everything else is loaded with javascript, whether it’s static or SSR?
Well that’s how I assume it works, I might be wrong
I will also use this video to answer questions
Next also has some caching mechanisms that can be good or bad. You don't get that with a regular Vite React SPA.
I REALLY need a perfect SEO. I have just dumped NuxtJs which was terrible and I am in love with NextJS. Even tho it will take me a couple of months to rewrite I already see it will be smoother overall.
sick painting
Would've been nice if you had explained how Nextjs works like with bundle splitting etc.
dang, solid video!
Hey Theo, video on upgrading T3 app to use the app directory update of nextjs next? Why? Just because!
Love the thumbnail 🤣😍
22:13 basically React explained in one phrase 😂
when I see your videos I feel I am being assigned homework... "if you wanna get good at this you better watch his video"
Just awesome
3:40 Shift-Opt-drag your line to duplicate on the same position and drag it on the vertical/horizontal axis 📎📄
Hey theo, where can i found your vs code setting and extension list?
How does NextJS handle links to other pages? Will the page its going to act like a normal react app (instant switch) if there is no server side rendering? What if the page its going to is static?
I had a hard laugh on "servers dont have windows because they run linux" :D excited about t3 stack
I wanna see if its possible to have React SSR with something like Spring boot
I am still trying to wrap my mind about what happens when page contains components that can not be rendered on server, how does all that gets stitched up. I guess at best there would be holes, or place holders for client side to fill in?
Just Great!
Great explanation! Just not gonna ask any questions to avoid being outright stupid.
Your voice sound really arrogant but you really are a good teacher which negate the latter hahaha thank you so much
How do you learn stuff like this? I know I learned it from you but how do you find resources to learn things like this.
Some apps like Next have documentation that is extremely insightful but nowhere in the React docs would I have learned how react actually works.
I shared this with my co op student! Can you make the same for Astro?
How nextJS optimizes application for SEO? so if it's steel spa why we can't have good seo with cra?
So if we don't use getServerSideprops it will still generate static html for us but for data fetching it just works like Client side React. Am I correct?
I'm confused - I've been following along with your T3 Stack Tutorial (I'm up to the part where we show user details in each tweet) and the page is definitely hydrating on load, the initial HTML is just a skeleton... Which seems to contradict what this video is saying?
Next can't do all of the things that can be in "this is next". The server could serve the original page with some parts that are based on cookies, etc.
Hi everyone, am I missing a part, or is this video simply explaining that NextJS will take care of the server-side processing through getServerSideProps and return the rendered HTML as a result.
After the HTML has been returned to the client, the next part is entirely in react.
You should do the same for the new version....
amazing video
probably, I haven't finished watching it yet
my hypothesis was correct
(I watch at 2x speed)
React = interactive sites
Next = HTML correct for sites as soon as they load
Dude, you are the best in making this voodoo technologies accessible to n00bs, thx!
Amazing
What does React Native do with expo?
Many newer developers are running in development. Local host and all that, personally I have made a call to local storage in dev mode, and the program works fine. Will that not work in production?
Why some people still use firestore on SSR? What are the benefits?
Explain how next js is a spa? If I request a different server side page then it has to go to the server right? The entire app isn’t loaded on the client?
we have nest js backend and are looking to move to next js on the front end (from CRA). Server components seem really cool and powerful, but I am trying to wrap my head around how they can be used with an API and without bypassing guards. Any tips?
Do you mean bringing client credentials, such as tokens, when the server component making requests?
I guess I would say "incomplete" rather than "incorrect" for the initial html.
Is PHP considered server side rendering?
Yes its its whole purpose
PHP and the likes do "classic server-rendered templates", but SSR is generally used to refer to rendering an SPA on the server. Using SSR for the former can be confusing, albeit semantically correct.
The font is hard to read on an 8 inch tablet. Can you please switch to some sans serif font?
I've been learnig NEXTjs for almost a week reading the Pages Router docs, and there's something that still doesn't make sense in my head.... When a page that was rendered on the server gets to the client as a Loading state or as an UI skeleton, does that mean that the server have a "correct" but empty HTML version of what the user gets after the client fetches and loads the data? Only then the user gets the 2nd correct but complete version of the same HTML page?
Idk if that's clear enough, hopefully it is..
the only benefit of SSR compare to a SPA with router level prefetching is the real 1st time load, right after, SSR has no benefit, and might make your app slow, depends on how you setup your infranstruture. Browser caches all the assets for you, no more downloading, that page rendering is instant, you just need to solve the data prefetching part.
not to mention the unsolveable TTI problem in SSR approach, you have to load js for SSR app too. for highly interactive app, SPA is sigficantly easier to build than SSR. Give the illusion of the page is interatable while it is just a fake HTML from SSR is a disaster for low speed network speed, learnt it the hard way.
What most SaaS needs is not fully SSR, is SSG for non-auth part and SPA for after-auth part, better to deploy your frontend on the edge with static assets ONLY. Scales way better than blindly deploy your backend "function" on the edge while your DB is not, not to mention, your frontend app deploys on Vercel and SSR over there.... completely performance disasterer...
nice intro
What does it mean by correct html?
Can this be used to obscure the api of the admin page?
If an attacker tries to load the admin page without auth he wouldn't even know what js he should load, which would know how to interact with the api. Am i correct?
I don't know what you mean but serious information or data should always come from a secured api. You shouldn't just hide sensitive information in your client side app but should also secure your backend.
Always verify who the user is in your backend before you send that data to your frontend. Doesn't matter what you are using this shouldn't be problem.
Please make a t3 stack SERIES ... explaining the what is what. I am so confused.
ask better questions man
TechWithTom explains it
24:31 I disagree, otherwise how come next.js ships bundle that is like 2x the size of comparable React+vite SPA?
Why not to put an actual html into the react root page instread?
jesus christ... I finally understand