React server components from scratch!

  Рет қаралды 26,824

Ben Holmes

Ben Holmes

5 ай бұрын

Repo: github.com/bholmesdev/simple-rsc
Let's build a node server, stream an RSC to your browser, and handle client component bundling!
#javascript #programming #reactjs #tutorial

Пікірлер: 107
@t3dotgg
@t3dotgg 5 ай бұрын
One of the best RSC videos I've seen so far
@developsdaniel
@developsdaniel 4 ай бұрын
You meant the best though right?
@iamfrankstallone
@iamfrankstallone 4 ай бұрын
This is one of the best 20 minute tutorials I’ve ever watched. 👏🏻 Ben, your format, production, depth of knowledge, ability to articulate that knowledge, and humor created a masterpiece. 🎉 I had no interest in ever learning how to do this. As a front of the front end recovering React developer my interest in this subject was low coming in. You magically peaked my interest, keep me engaged, and - to my absolute shock - I understood everything… including the webpack monkey patch. 😅
@bholmesdev
@bholmesdev 4 ай бұрын
Appreciate that so much! Glad it all clicked for you 🙌
@thejackshelton
@thejackshelton 4 ай бұрын
I think Ben just did a better job explaining RSC's in 20 minutes than the entire industry in the last 2 years 😅
@dgurney
@dgurney 5 ай бұрын
Wow this was an incredible explanation. Of all the videos and posts I’ve seen about RSC, this is the ONLY ONE THAT ACTUALLY MAKES SENSE and explains how things really work under the hood. Well done
@ProjectNeo-tk4hm
@ProjectNeo-tk4hm Ай бұрын
So cool, I also had an idea that RSC looks a lot like PHP, and you confirmed it!
@joan.paucar
@joan.paucar 4 ай бұрын
Dang, I will just say ‘underrated video for devs’, great video Ben
@lebon1211
@lebon1211 29 күн бұрын
Amazing! You do make RSC look simple, and definitely understandable 👏🏼
@rockNbrain
@rockNbrain 4 ай бұрын
Great job Ben ... very interest to understand the magic behind these frameworks!!
@antoniojurkic7455
@antoniojurkic7455 3 ай бұрын
This is awesome. So concise, fun and without unnecessary info. Please do more! 👏
@Akshatgiri
@Akshatgiri 4 ай бұрын
This is awesome! Can't wait for every ecosystem ( go, laravel, rust etc ) to add react server components to their frameworks.
@armchair-architect
@armchair-architect 4 ай бұрын
If all you need is server side rendering, then Laravel Livewire would get you there without all the extra plumbing. However if your use case requires server side rendering and then intricate client side logic as well, then this approach is perfecto.
@neociber24
@neociber24 4 ай бұрын
Never though about using React server components outside JS
@Akshatgiri
@Akshatgiri 4 ай бұрын
@@armchair-architect Absolutely. Most projects I work on happen to require a dynamic frontend somewhere in the app. And though web components are a pretty good solution, react server components + react client side components + a solid backend stack is the move.
@pvsagar92
@pvsagar92 4 ай бұрын
With this depth of knowledge and the ability to code it as well, you can very well be a core React team member. Great work bro !
@Jdthegeek
@Jdthegeek 4 ай бұрын
Only a few minutes in and became an instant subscribe. So few videos are this clearly explained! Thank you.
@maxwebstudio
@maxwebstudio 3 ай бұрын
Men, first this format is really cool. Nice to see you on a setup different than from your YT shorts. Second that explanation was just awesome ! Thank you !
@igrb
@igrb 5 ай бұрын
the fact that you did this in 19 mins is CRAZY common whiteboard man win
@thisweekinreact
@thisweekinreact 4 ай бұрын
Great video, and also nice teaser for the 4h stream that I want to watch now 😄
@TanweerAlam2008
@TanweerAlam2008 3 ай бұрын
This a great presentation style. Appreciate the energy.
@sylarfx
@sylarfx 4 ай бұрын
Instant subscribe within the first minute. Love the energy!
@fkondratov
@fkondratov 20 күн бұрын
my brain got grilled a couple of times during this, but it was worth it
@NiklasZiermann
@NiklasZiermann 4 ай бұрын
Awesome explanation. Stuff like this will hopefully help more people understand which parts of server components actually are just react and which are nextjs magic :)
@developsdaniel
@developsdaniel 4 ай бұрын
I’m enjoying following your journey Ben, I keep ending up at the places you’ve been solving - 11ty islanding, then fed up with 11ty dev experience, I’ve been looking to make a JAM stack site boilerplate with static server component islanding, and this vid did half the work for me. ❤❤
@4lissondev
@4lissondev 5 ай бұрын
This video is amazing!!!! Thanks Ben.
@DanelonNicolas
@DanelonNicolas 4 ай бұрын
I want you as president of the whole world. I think it's impossible to be more clear. Thanks! And thanks to Sebastian for sharing your video.
@aleksamitic6655
@aleksamitic6655 4 ай бұрын
Amazing content mate! Keep it up!
@abdessamadchokri352
@abdessamadchokri352 2 ай бұрын
Woow, Absolutely the best SSR tuto explanation !
@combatninjaturtle
@combatninjaturtle 5 ай бұрын
Yessss! This is what I needed. Thanks man!
@DEV_XO
@DEV_XO 4 ай бұрын
Amazing video Ben!
@idmt93
@idmt93 3 ай бұрын
Great content man! Subscribed
@TrostCodes
@TrostCodes 4 ай бұрын
You're incredible dude, this was excellent!
@bholmesdev
@bholmesdev 4 ай бұрын
Thank you Mr. Horse! ❤
@saramshshrestha7641
@saramshshrestha7641 2 ай бұрын
Damn, you're really good. It was awesome.
@Andrei_Calazans
@Andrei_Calazans 4 ай бұрын
Incredible tutorial
@Marhaenism1930
@Marhaenism1930 4 ай бұрын
good one ben, and thanks for ur explanation in less than 20mins
@bholmesdev
@bholmesdev 4 ай бұрын
Thanks! Short explainers are my specialty :)
@s1n7ax
@s1n7ax 3 ай бұрын
Bruh. This is the best react related video ever
@aamiramin6112
@aamiramin6112 4 ай бұрын
Ben, I'm amazed by the level of knowledge and expertise that you have it's amazing. Thanks for sharing this and I love it please keep sharing your knowledge
@bholmesdev
@bholmesdev 4 ай бұрын
Appreciate that so much! Will do ❤️
@jitx2797
@jitx2797 5 ай бұрын
Wow. I am stunned
@FreeCodeArena
@FreeCodeArena 3 ай бұрын
I dont know half the things you just did, but this was super fun to watch😅. I'm gonna go watch more of your videos
@bholmesdev
@bholmesdev 2 ай бұрын
Haha, glad I could be some nerd entertainment for you! Feel the same watching LowLevelLearning explain C 😅
@codante-io
@codante-io 4 ай бұрын
Amazing video! Thanks
@waldemarkunz9173
@waldemarkunz9173 5 ай бұрын
Great video! Thank you.
@SSn0wx
@SSn0wx 4 ай бұрын
Damn this is a super nice video, keep up the content
@ThugLifeModafocah
@ThugLifeModafocah 4 ай бұрын
impressive knowledge display.
@aryomuhammad8254
@aryomuhammad8254 2 ай бұрын
Half of the video kinda hurt my brain. Great video Ben! Thank you!
@jens2635
@jens2635 4 ай бұрын
well done, really interesting.
@kengreeff
@kengreeff 4 ай бұрын
Amazing!
@justpatrick_
@justpatrick_ 3 ай бұрын
Am a vue but my goodness this was great. It even clicked why this would be beneficial for react native
@pauljeremiahmugaya3292
@pauljeremiahmugaya3292 3 ай бұрын
This is amazing 👏
@sonipratik6405
@sonipratik6405 Ай бұрын
Wow this is awesome ❤️
@0xtz_
@0xtz_ 4 ай бұрын
bro all this in 20 min 😮 🔥
@thegithaka
@thegithaka 2 ай бұрын
kudos!
@mattwayne9128
@mattwayne9128 5 ай бұрын
Let's gooooooo
@BrendonSled
@BrendonSled 4 ай бұрын
This is amazing. Have you tried implementing server actions?
@pogospoofer69420
@pogospoofer69420 3 ай бұрын
Dan Abramov will write a Novel explaining this (also other Reat devs). You are the best!
@jim.....
@jim..... 2 ай бұрын
i believe this video is inspired by dan's post from last June of the same name github /reactwg/server-components/discussions/5
@crapfartsmen
@crapfartsmen 5 ай бұрын
Hell yeah dude
@muhammadyousufhere
@muhammadyousufhere 4 ай бұрын
Wow Man! 😮
@kumnegerwondimu9848
@kumnegerwondimu9848 3 ай бұрын
u are so underrated
@romank1ng528
@romank1ng528 4 ай бұрын
Amazing video! Very thorough, I also like to use hono, however I couldn't help but wonder what shell prompt you're using
@bholmesdev
@bholmesdev 3 ай бұрын
Ah thanks! And I'm using oh-my-zsh with spaceship prompt github.com/spaceship-prompt/spaceship-prompt
@najlepszyinformatyk1661
@najlepszyinformatyk1661 4 ай бұрын
Cool
@wouter1625
@wouter1625 4 ай бұрын
this video is cracked
@amaechinaikechukwu8266
@amaechinaikechukwu8266 4 ай бұрын
❤❤❤
@anasrin
@anasrin 4 ай бұрын
cool way to use snippet
@toothless.tarantula
@toothless.tarantula 4 ай бұрын
Wow
@iPankBMW
@iPankBMW 5 ай бұрын
Nice video! Do you know how we can make the default 30second (client side cache)/(router cache) for server components in Nextjs to 0 seconds? Its kinda impossible to get the latest data in SRC on subnavigation (clicking on component). Maybe create a PR for Nextjs about this issue :)
@bholmesdev
@bholmesdev 5 ай бұрын
Yeah, I generally just... don't like NextJS' aggressive caching strategy. Hoping they make caching a manual opt-in instead of an invisible default
@iPankBMW
@iPankBMW 5 ай бұрын
Whats your preferred JS Framework/Library?@@bholmesdev
@noahginsburg6140
@noahginsburg6140 3 ай бұрын
What a video! Question: I have an async data fetching RSC. When my application builds, a static page is rendered with the HTML rendering the data from the data fetch. Correct so far? Now when a user say navigates to my application site, I need that component to render with fresh data. How will that currently static page know to re-render with fresh data? I can't imagine everything needs to be marked "force dynamic", at least in nextjs. I may still be missing a concept around this. Thanks again for a great video.
@bholmesdev
@bholmesdev 3 ай бұрын
Hey thanks Noah! Yes, page re-rendering is an interesting concept we didn't cover in the video. Next.js has special automations for caching static vs. dynamic data. My understanding is: - if a component is *only* used for static content, it's render to HTML at build time as you described. - if that component is then used to re-render content dynamically, that component now ships as a Javacript endpoint. Next.js smartly decides when this switch happens. Hope that helps!
@noahginsburg6140
@noahginsburg6140 3 ай бұрын
That does help. I think this video offered great clarity into RSC implementation but the NextJs abstractions seem to muddy that up a bit. Anyways, thanks for responding. Look forward to more content.@@bholmesdev
@drprdcts
@drprdcts 4 ай бұрын
Great tutorial! What browser are you using?
@bholmesdev
@bholmesdev 4 ай бұрын
arc.net !
@lutfiikbalmajid
@lutfiikbalmajid 4 ай бұрын
I have try creating Htmx server component with Elysia :D
@echobucket
@echobucket 29 күн бұрын
Where is the W3C RFC on this proprietary format React is using here?
@martingreler6236
@martingreler6236 29 күн бұрын
Bro coded up nextjs in 20 minutes
@supriyomonndal6199
@supriyomonndal6199 5 ай бұрын
Amazing work ben! What's the extension doing the auto complete?
@bholmesdev
@bholmesdev 5 ай бұрын
I'm using VS Code snippets I wrote myself! Intended to make the video run smoother, but you can use them yourself by cloning github.com/bholmesdev/simple-rsc
@echobucket
@echobucket 29 күн бұрын
At any point when watching this or writing this, did anyone stop to say "Wait.. this is too complex, perhaps we shouldn't be doing this"
@acopier
@acopier 13 күн бұрын
stfu it ain't that complex
@atharvapise
@atharvapise 5 ай бұрын
ohh damn, hot clip by Ben after a long time. RSCs for the win
@ahmedAltariqi
@ahmedAltariqi 5 ай бұрын
Dude, I can't code along without pausing, because you're using a lot of snippets lol Share them please!
@bholmesdev
@bholmesdev 5 ай бұрын
Understood! Kinda expect coders to pause. It's a delicate balance between tight explanations and typing every thing. If you clone github.com/bholmesdev/simple-rsc and open in VS Code, all the snippets are there. Just empty out `server.js` and get going.
@ahmedAltariqi
@ahmedAltariqi 5 ай бұрын
@@bholmesdev Thank you, Ben!
@smithshaw1151
@smithshaw1151 Ай бұрын
Can one use rsc with htmx?
@bholmesdev
@bholmesdev Ай бұрын
Admittedly no, they are very different approaches to rerendering server content. RSCs send a format from the server that isn't _quite_ HTML, so HTMX couldn't process it
@jackpurdoneverydayzero
@jackpurdoneverydayzero 5 ай бұрын
Spotifn't haha
@guozhangliew7302
@guozhangliew7302 4 ай бұрын
so RSC is not doing SSR?
@bholmesdev
@bholmesdev 4 ай бұрын
Ah, good observation! SSR is a separate step that we *can* add so the user sees an initial view while the rest of the page streams down. I reached out to the React team about this and got a pretty minimal example if you're curious: github.com/mattcarrollcode/react-serving-patterns/tree/main/ssr-and-rsc
@guozhangliew7302
@guozhangliew7302 4 ай бұрын
@@bholmesdev awesome thanks for reaching out to the team! appreciate it!
@Alcani3ca
@Alcani3ca 2 ай бұрын
I'm so lost. How do you center a div??
@bholmesdev
@bholmesdev 2 ай бұрын
sir this is a wendy's
@bobobo1673
@bobobo1673 4 ай бұрын
How old are you?
@fullstack_journey
@fullstack_journey 4 ай бұрын
This is what the company I'm in did, 7 years ago.. and were still maintaining this proprietary piece of sh.. code to this day (it's horrible)
@ray-lee
@ray-lee 5 ай бұрын
please fix nextjs
@bholmesdev
@bholmesdev 5 ай бұрын
We did! astro.build ;)
@mohamedtaher88
@mohamedtaher88 Ай бұрын
why cant you simply first explain the "WHY" ?
@madeinhvn
@madeinhvn 5 ай бұрын
Woah what a new Ben video that's more than 2 minutes??
@passarygmail2780
@passarygmail2780 2 ай бұрын
I wonder how the virtual dom would look like in the browser... would love a reels on that one
@planetmall2
@planetmall2 4 ай бұрын
Amazing!
Write React Server Components from Scratch
39:23
Tejas Kumar
Рет қаралды 8 М.
Why Doesn’t Everyone Use This Animation???
23:59
Theo - t3․gg
Рет қаралды 84 М.
Зу-зу Күлпәш. Агроном. (5-бөлім)
55:20
ASTANATV Movie
Рет қаралды 410 М.
I PEELED OFF THE CARDBOARD WATERMELON!#asmr
00:56
HAYATAKU はやたく
Рет қаралды 26 МЛН
КИРПИЧ ОБ ГОЛОВУ #shorts
00:24
Паша Осадчий
Рет қаралды 6 МЛН
ISSEI funny story😂😂😂Strange World | Magic Lips💋
00:36
ISSEI / いっせい
Рет қаралды 116 МЛН
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 166 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 307 М.
OpenAI’s GPT-4o: The Best AI Is Now Free!
9:14
Two Minute Papers
Рет қаралды 163 М.
ChatGPT’s Amazing New Model Feels Human (and it's Free)
25:02
Matt Wolfe
Рет қаралды 151 М.
Finally Fix Your Issues With JS/React Memory Management 😤
20:13
Jack Herrington
Рет қаралды 75 М.
Goodbye, useEffect - David Khourshid
29:59
BeJS
Рет қаралды 492 М.
React Server Components Made Easy(With Examples and Demo)
43:53
tapaScript by Tapas Adhikary
Рет қаралды 11 М.
Clash Of Clans X Haaland Troll Face Edit🔥☠️ | #shortsvideo #capcut
1:00
спидран по ютуб шортс 68 | Битва статуй!
0:42
Очень крутая игра😱
0:20
ShortBoy
Рет қаралды 2,8 МЛН