How NextJS REALLY Works

  Рет қаралды 134,457

Theo - t3․gg

Theo - t3․gg

Жыл бұрын

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

Пікірлер: 164
@asiraky
@asiraky Жыл бұрын
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.
@iGhostr
@iGhostr Жыл бұрын
same
@huebdoo
@huebdoo 7 ай бұрын
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!
@Johnson-ks5uw
@Johnson-ks5uw Жыл бұрын
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!
@gabrielwest2584
@gabrielwest2584 Жыл бұрын
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 :)
@itzfinners7458
@itzfinners7458 Жыл бұрын
Loving the new production style of video editing Theo! Just the inclusion of a "Coming Up" section is a great addition!
@abel090713
@abel090713 Жыл бұрын
I missed like half of this live video so glad the video came out, this might be a personal favorite
@NikitaLipkanovOfficial
@NikitaLipkanovOfficial Жыл бұрын
Love the explanation about that! Thanks for clarifying!
@ShiloBuff
@ShiloBuff Жыл бұрын
This is amazing depth and details. Right down my alley. I like your style. Thank you.
@phucnguyen0110
@phucnguyen0110 Жыл бұрын
ty Theo, just what I needed since I've been playing with Next a lot these days.
@faizanahmed9304
@faizanahmed9304 Жыл бұрын
That is a beautiful explanation, thank you, Theo!
@matthewvalentine9961
@matthewvalentine9961 Жыл бұрын
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 !
@teosurch
@teosurch Жыл бұрын
Thanks a lot. So good to learn this things not by using documentation, but by watching nice KZbin channel with a cup of tea :)
@shivamjhaa
@shivamjhaa Жыл бұрын
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?
@DennisHorn1981
@DennisHorn1981 Жыл бұрын
This is absolutely important background-knowledge! Fantastic explanation! Thank you! 😀👍
@JavierPortillo1
@JavierPortillo1 Жыл бұрын
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 👍
@kolega1999
@kolega1999 Жыл бұрын
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.
@giovannicostantini6269
@giovannicostantini6269 Жыл бұрын
You're an amazing person! Great quality content
@mohamedhassenetetbirt6841
@mohamedhassenetetbirt6841 Жыл бұрын
Amazing work, helped me fix small confusions
@samuelgunter
@samuelgunter Жыл бұрын
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
@doritoflake9375
@doritoflake9375 Жыл бұрын
Thanks for sharing! I suddenly started seeing this as well recently on my sites and was wondering what broke lol
@t3dotgg
@t3dotgg Жыл бұрын
This is super good to know thank you
@dipneupane3179
@dipneupane3179 Жыл бұрын
You explained it so easily. Thanks for the effort.
@robgioeli
@robgioeli 8 ай бұрын
The intro music and clip-of-content before the explanation video starts is gold. You should start doing this again.
@sarmunbustillo9217
@sarmunbustillo9217 Жыл бұрын
Uff what an explanation! Really good video!
@georgekrax
@georgekrax Жыл бұрын
We needed a video like this 🙏
@mtin79
@mtin79 Жыл бұрын
Awesome, would love the same for remix run!
@MehediHassan-pn5uc
@MehediHassan-pn5uc Жыл бұрын
Really Love All Your Videos ❤️
@victorbrown3155
@victorbrown3155 7 ай бұрын
We really need this for app router as well. Especially how navigation works!
@artemiygolden2853
@artemiygolden2853 Жыл бұрын
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!
@faraonch
@faraonch Жыл бұрын
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.
@eliuddyn
@eliuddyn Жыл бұрын
Amazing explanation 🔥🔥
@JoelMathewmatgoogle
@JoelMathewmatgoogle Жыл бұрын
Thank you for this!
@FernandoJaramillo-jw7nm
@FernandoJaramillo-jw7nm 3 ай бұрын
Very nice explanation, Thank you...!
@austincodes
@austincodes Жыл бұрын
One of the huge things that is overlooked with nextJs is the build tools
@elhaambasheerch7058
@elhaambasheerch7058 11 ай бұрын
Great video! You just earned a sub theo.
@oscardasilva971
@oscardasilva971 Жыл бұрын
Valuable content, thank you
@berkaycirak
@berkaycirak Жыл бұрын
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?
@AsheAve
@AsheAve 7 ай бұрын
Nice explanation. Thank you.
@georixyo7115
@georixyo7115 Жыл бұрын
genius explanation, thanks!
@dixztube
@dixztube Жыл бұрын
Great job man!!
@prasad_yt
@prasad_yt Жыл бұрын
Thanks for this helpful video.
@paulyi9365
@paulyi9365 Жыл бұрын
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)
@user-ux9ud7gf6q
@user-ux9ud7gf6q Жыл бұрын
This is soo good. Thanks !
@mmgordion
@mmgordion Жыл бұрын
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.
@jazsouf
@jazsouf 8 ай бұрын
Next also has some caching mechanisms that can be good or bad. You don't get that with a regular Vite React SPA.
@tastelikecrypto7051
@tastelikecrypto7051 Жыл бұрын
The way I understood it is next js is aiming to do what Angular does. Thanks for the content.
@vincentnthomas1
@vincentnthomas1 10 ай бұрын
No?
@bryanngen5572
@bryanngen5572 Жыл бұрын
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
@pedroalonsoms
@pedroalonsoms Жыл бұрын
your videos are awesome❤
@ragnarlothbrook8117
@ragnarlothbrook8117 10 ай бұрын
awesome video! Thanks 👍🏻
@aaronmendez9284
@aaronmendez9284 Жыл бұрын
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!
@anuragk6722
@anuragk6722 Жыл бұрын
awesome video, wondering which software you use to record the screen and your face?
@tuktuk9004
@tuktuk9004 Жыл бұрын
great explanation
@NuanceWebsites
@NuanceWebsites 10 ай бұрын
you deserve a Nobel Peace prize for this youtube channel
@sidwebworks9871
@sidwebworks9871 Жыл бұрын
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.
@rico454
@rico454 Жыл бұрын
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.
@sidwebworks9871
@sidwebworks9871 Жыл бұрын
@@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.
@sitter2207
@sitter2207 Жыл бұрын
@@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
@rico454
@rico454 Жыл бұрын
@@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
@jjrise
@jjrise Жыл бұрын
dang, solid video!
@msrini
@msrini Жыл бұрын
Good video editing
@OhDevBeard
@OhDevBeard Жыл бұрын
Hey Theo, video on upgrading T3 app to use the app directory update of nextjs next? Why? Just because!
@pablom8854
@pablom8854 8 ай бұрын
22:13 basically React explained in one phrase 😂
@yogiadianta1156
@yogiadianta1156 Жыл бұрын
Hey theo, where can i found your vs code setting and extension list?
@i-am-the-slime
@i-am-the-slime Жыл бұрын
Would've been nice if you had explained how Nextjs works like with bundle splitting etc.
@joepetrillo6185
@joepetrillo6185 Жыл бұрын
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?
@venus-sz2sl
@venus-sz2sl Жыл бұрын
Love the thumbnail 🤣😍
@luisllaboj
@luisllaboj 8 ай бұрын
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..
@user-ge2vc3rl1n
@user-ge2vc3rl1n 11 ай бұрын
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.
@voidmind
@voidmind Жыл бұрын
I will also use this video to answer questions
@johndoyle3816
@johndoyle3816 11 ай бұрын
sick painting
@techne_
@techne_ Жыл бұрын
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.
@nan5715
@nan5715 Ай бұрын
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?
@harshilparmar9076
@harshilparmar9076 Жыл бұрын
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?
@mike110111
@mike110111 Жыл бұрын
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?
@davorinrusevljan6440
@davorinrusevljan6440 Жыл бұрын
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?
@SamyarBorder
@SamyarBorder Жыл бұрын
How nextJS optimizes application for SEO? so if it's steel spa why we can't have good seo with cra?
@excalidraw
@excalidraw Жыл бұрын
3:40 Shift-Opt-drag your line to duplicate on the same position and drag it on the vertical/horizontal axis 📎📄
@coder1122
@coder1122 Жыл бұрын
Just awesome
@MrJgracias
@MrJgracias Жыл бұрын
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?
@GeekOverdose
@GeekOverdose Жыл бұрын
I wanna see if its possible to have React SSR with something like Spring boot
@mrxcreamy10
@mrxcreamy10 10 ай бұрын
What does React Native do with expo?
@notfadeaway6617
@notfadeaway6617 Жыл бұрын
Why some people still use firestore on SSR? What are the benefits?
@persas1683
@persas1683 Жыл бұрын
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.
@JLarky
@JLarky Жыл бұрын
24:31 I disagree, otherwise how come next.js ships bundle that is like 2x the size of comparable React+vite SPA?
@guillermoquiros2402
@guillermoquiros2402 Жыл бұрын
Just Great!
@MrStanley85
@MrStanley85 Жыл бұрын
I had a hard laugh on "servers dont have windows because they run linux" :D excited about t3 stack
@TheUltimateGeminiHasSurvived
@TheUltimateGeminiHasSurvived Жыл бұрын
I shared this with my co op student! Can you make the same for Astro?
@cameronratliff8441
@cameronratliff8441 11 ай бұрын
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?
@zhongtom2625
@zhongtom2625 9 ай бұрын
Do you mean bringing client credentials, such as tokens, when the server component making requests?
@KevinOfSteel
@KevinOfSteel 7 ай бұрын
Great explanation! Just not gonna ask any questions to avoid being outright stupid.
@stvlley
@stvlley Жыл бұрын
when I see your videos I feel I am being assigned homework... "if you wanna get good at this you better watch his video"
@MrBlazzerBoy
@MrBlazzerBoy Жыл бұрын
The font is hard to read on an 8 inch tablet. Can you please switch to some sans serif font?
@nroose
@nroose Жыл бұрын
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.
@FlorianWendelborn
@FlorianWendelborn Жыл бұрын
Do you need to opt-in to Twitter Card Validator somehow? I’m getting a `403` error on both Firefox and Chrome when I try to use it, no matter what URL I try (even from other, well-known websites) Actually, I have the same symptoms as seen in 14:00
@SatyamSingh-rq2tc
@SatyamSingh-rq2tc Жыл бұрын
The Twitter card preview has been disabled for everyone since April 2022.
@FlorianWendelborn
@FlorianWendelborn Жыл бұрын
@@SatyamSingh-rq2tc Amazing that they still have the website up then lol
@nan5715
@nan5715 Ай бұрын
What does it mean by correct html?
@Lambda1235
@Lambda1235 Жыл бұрын
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?
@m0rt068
@m0rt068 Жыл бұрын
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.
@Aristocrator
@Aristocrator Ай бұрын
Why not to put an actual html into the react root page instread?
@vishalsangole836
@vishalsangole836 6 ай бұрын
so react is still shipped to client huh
@hemanthkotagiri8865
@hemanthkotagiri8865 Жыл бұрын
is this still valid after Next.js 13 Release?
@deamorta6117
@deamorta6117 Жыл бұрын
Your voice sound really arrogant but you really are a good teacher which negate the latter hahaha thank you so much
@apratimjaiswal
@apratimjaiswal Жыл бұрын
Amazing
@samuelgunter
@samuelgunter Жыл бұрын
amazing video
@samuelgunter
@samuelgunter Жыл бұрын
probably, I haven't finished watching it yet
@samuelgunter
@samuelgunter Жыл бұрын
my hypothesis was correct (I watch at 2x speed)
@luissolanodev
@luissolanodev Жыл бұрын
Is there a reason to ever use something like vite given your statement about regreting not be using nextjs when SEO becomes relevant?
@magne6049
@magne6049 Жыл бұрын
you can SSR with Vite too
@luissolanodev
@luissolanodev Жыл бұрын
@@magne6049 thanks! I guess my question is more about where do tools like vite fit? Does it come down to the other specific feature they have other than SSR to determine whether I want to use (i.e.) vite vs nextjs? Sorry I may be just lacking knowledge about vite
@nroose
@nroose Жыл бұрын
I guess I would say "incomplete" rather than "incorrect" for the initial html.
@niksatan
@niksatan Жыл бұрын
Dude, you are the best in making this voodoo technologies accessible to n00bs, thx!
@AndrewTSq
@AndrewTSq Жыл бұрын
Is PHP considered server side rendering?
@mqix3741
@mqix3741 Жыл бұрын
Yes its its whole purpose
@magne6049
@magne6049 Жыл бұрын
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.
@henrmota
@henrmota 5 ай бұрын
You should do the same for the new version....
@lightninginmyhands4878
@lightninginmyhands4878 Жыл бұрын
React = interactive sites Next = HTML correct for sites as soon as they load
@muss-raff5477
@muss-raff5477 8 ай бұрын
Either I'm too dumb for cs,Web dev, ,programming 😢 or that this video is for newbies with next cause i didn't get nothing worth watching 26 min of saying next give correct html and react give blank page at first load . Im i correct 🙁 or did i miss the point wtf🤕🤕
Do you REALLY need SSR?
18:15
Theo - t3․gg
Рет қаралды 155 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 528 М.
How did CatNap end up in Luca cartoon?🙀
00:16
LOL
Рет қаралды 6 МЛН
0% Respect Moments 😥
00:27
LE FOOT EN VIDÉO
Рет қаралды 45 МЛН
Can You Draw The PERFECT Circle?
00:57
Stokes Twins
Рет қаралды 55 МЛН
JavaScript Framework Tier List
40:57
Theo - t3․gg
Рет қаралды 274 М.
ChatGPT’s Amazing New Model Feels Human (and it's Free)
25:02
Matt Wolfe
Рет қаралды 172 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 167 М.
Why Doesn’t Everyone Use This Animation???
23:59
Theo - t3․gg
Рет қаралды 85 М.
The Biggest Change In React’s History
11:50
Theo - t3․gg
Рет қаралды 294 М.
How was this not in the browser before???
16:30
Theo - t3․gg
Рет қаралды 61 М.
The Problem With UUIDs
25:53
Theo - t3․gg
Рет қаралды 133 М.
State Managers Are Making Your Code Worse In React
13:33
Web Dev Simplified
Рет қаралды 139 М.
Why WebAssembly Can't Win
19:38
Theo - t3․gg
Рет қаралды 91 М.
Introducing GPT-4o
26:13
OpenAI
Рет қаралды 3 МЛН
Купите ЭТОТ БЮДЖЕТНИК вместо флагманов от Samsung, Xiaomi и Apple!
13:03
Thebox - о технике и гаджетах
Рет қаралды 57 М.
phone charge game #viral #tranding #new #reels
0:18
YODHA GAMING RAAS
Рет қаралды 12 МЛН
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 187 М.
Индуктивность и дроссель.
1:00
Hi Dev! – Электроника
Рет қаралды 357 М.