Choosing between SSR, SSG, and dynamic rendering in Astro

  Рет қаралды 13,578

Coding in Public

Coding in Public

9 ай бұрын

Join the early access list for my course! learnastro.dev
Astro offers several options for rendering, SSG, SSR, or a combination of the two in either direction (static-first or server-first) with dynamic rendering.
🔗 Key Links 🔗
- docs.astro.build/en/guides/se...
---------------------------------------
🎨 VSCode Theming
- Font: Cascadia Code: github.com/microsoft/cascadia...
- Theme: marketplace.visualstudio.com/...
- Icons: marketplace.visualstudio.com/...
---------------------------------------
🌐 Connect With Me 🌐
- Website: codinginpublic.dev
- Blog: chrispennington.blog
- Twitter: / cpenned
- Patreon: / coding_in_public
- Buy Me a Coffee: www.buymeacoffee.com/chrispen...

Пікірлер: 85
@mrrolandlawrence
@mrrolandlawrence Ай бұрын
this astro series is the best out there. saves me fumbling with the core docs. practical examples always help.
@CodinginPublic
@CodinginPublic Ай бұрын
So glad you’ve enjoyed the videos!
@aryomuhammad8254
@aryomuhammad8254 2 ай бұрын
I really love how you explained things with drawing style like this, it really helped a lot. Thank you!
@CodinginPublic
@CodinginPublic 2 ай бұрын
You're very welcome! So glad it was such a help!
@unity_12
@unity_12 9 ай бұрын
I can never figure out how it all works. Through videos and diagrams it became clear. I'm waiting for a video with hybrid rendering! I liked the video 😇
@CodinginPublic
@CodinginPublic 9 ай бұрын
So glad it was a help!
@jamesgrubb
@jamesgrubb 8 ай бұрын
Thanks for this content and your time. Middleware examples would be great - perhaps authentication / authorisation how-to
@CodinginPublic
@CodinginPublic 8 ай бұрын
Working on something right now that could use some middlewear…I'll see about figuring it out and doing a video! Thanks for the comment!
@egrekov
@egrekov 9 ай бұрын
Please continue this series. It's very useful and important for me. Thank you
@CodinginPublic
@CodinginPublic 9 ай бұрын
Glad it was a help!
@murtadha96
@murtadha96 9 ай бұрын
An absolutely fantastic explanation! Thank you
@CodinginPublic
@CodinginPublic 9 ай бұрын
Glad it was helpful!
@hiryuimajin
@hiryuimajin 9 ай бұрын
Your teaching is always amazing!
@CodinginPublic
@CodinginPublic 9 ай бұрын
Thanks for the kind words! So glad you enjoyed it!
@jmonterroso.dev13
@jmonterroso.dev13 7 ай бұрын
Great video as always and yes please, we all want the video of Middleware and astro island!!
@systematicpsychologic7321
@systematicpsychologic7321 7 ай бұрын
Thanks, this was a pretty great overview. Simple and informative. Makes me look forward to using Astro in a project.
@CodinginPublic
@CodinginPublic 7 ай бұрын
Glad you enjoyed it!
@21rogerwaters
@21rogerwaters 9 ай бұрын
Wow! Thank you! Great visual explanation, please do more like that =)
@CodinginPublic
@CodinginPublic 9 ай бұрын
Thanks, my friend. Glad you enjoyed it!
@veggtips.shorts
@veggtips.shorts 7 ай бұрын
Great content! Love how you explain!
@CodinginPublic
@CodinginPublic 7 ай бұрын
So glad it was a help!
@JavArButt
@JavArButt 9 ай бұрын
I have seen only some of your videos, up to now, I liked them all
@CodinginPublic
@CodinginPublic 9 ай бұрын
Thanks, my friend. Glad they’ve been a help!
@rayusaki88
@rayusaki88 7 ай бұрын
Vey helpful. Thanks 🙏🏻. Looking forward on your Astro course
@CodinginPublic
@CodinginPublic 7 ай бұрын
So glad it was a help!
@latch909
@latch909 7 ай бұрын
Unbelievable I didn't think to just build locally and look at the difference like this! Super clear information thank you
@CodinginPublic
@CodinginPublic 7 ай бұрын
So glad it was a help!
@user-fi7lb4oh2z
@user-fi7lb4oh2z 6 ай бұрын
Thank you for all your content man!
@CodinginPublic
@CodinginPublic 6 ай бұрын
Glad you’re enjoying the channel!
@joshreynolds4164
@joshreynolds4164 8 ай бұрын
Visuals really helped on this one!
@CodinginPublic
@CodinginPublic 8 ай бұрын
So glad it was a help!
@andrezorek
@andrezorek 7 ай бұрын
thank you, so much, dude. great content, very clear, very straightforward.
@CodinginPublic
@CodinginPublic 7 ай бұрын
So glad it was a help!
@Oggy-WanKenobi
@Oggy-WanKenobi 3 ай бұрын
This is a great resource! Thanks a ton
@CodinginPublic
@CodinginPublic 3 ай бұрын
Glad you enjoyed it!
@funkologie
@funkologie 9 ай бұрын
Thanks Chris!
@CodinginPublic
@CodinginPublic 9 ай бұрын
You’re welcome!
@LeoMiranda
@LeoMiranda 7 ай бұрын
Fantastic explanation, thanks
@CodinginPublic
@CodinginPublic 7 ай бұрын
So glad it was a help!
@secondubly
@secondubly 6 ай бұрын
just want to say a huge thanks for this video, it really helped me grasp exactly what adapters and SSR/SSG were doing because reading it in the docs it wasn't really sticking 😅
@CodinginPublic
@CodinginPublic 6 ай бұрын
So glad it was such a help! Visuals are often what unlocks concepts for me, so I’m glad it was a help.
@sujit_webdev
@sujit_webdev Ай бұрын
Thanks for such an amazing explanation and this extremely useful video!
@CodinginPublic
@CodinginPublic Ай бұрын
You're very welcome!
@oussamasethoum1665
@oussamasethoum1665 6 ай бұрын
This video was so clear and I understood everything, thank you so much.
@CodinginPublic
@CodinginPublic 6 ай бұрын
Glad it was helpful!
@akosbalint3485
@akosbalint3485 5 ай бұрын
Very good explanation. Thank you.
@CodinginPublic
@CodinginPublic 5 ай бұрын
So glad it was a help!
@sonny5497
@sonny5497 Ай бұрын
this was beautifully explained with diagrams. you are an amazing teacher 🎉
@CodinginPublic
@CodinginPublic Ай бұрын
Glad it was helpful! Thanks for the kind words!
@RodrigoDAgostino
@RodrigoDAgostino 9 ай бұрын
Such a clear explanation! Thank you for taking the time to not only explain the theory, but to also illustrate it through a good example. I’m really enjoying your content! :)
@CodinginPublic
@CodinginPublic 9 ай бұрын
You're very welcome! So glad it was helpful!
@FumezCreates
@FumezCreates 3 ай бұрын
I love Astro. Your explanation is magnificent
@CodinginPublic
@CodinginPublic 3 ай бұрын
Thanks for the kind words!
@christianseiler1250
@christianseiler1250 9 ай бұрын
Love your Astro videos - extremely clear and step by step. There is one thing I cannot figure out - which is how to access reference() data from a collection properly . Maybe you could do a short video about it one day?
@CodinginPublic
@CodinginPublic 9 ай бұрын
So glad you’ve enjoyed them. I think the content collections video should help with that (kzbin.info/www/bejne/sIbQoqCriNt9g9U). Let me know if you still have questions!
@SalvaToroTorus
@SalvaToroTorus 6 ай бұрын
Excellent
@CodinginPublic
@CodinginPublic 6 ай бұрын
Glad you found it helpful!
@Web-Dev-Codi
@Web-Dev-Codi 9 ай бұрын
I have been thinking about messing around with Astro for a while. I will be making the jump for sure after seeing this video. I love the illustrated visual aspect in this one. What program are you utilizing for the demonstration?
@CodinginPublic
@CodinginPublic 9 ай бұрын
So glad it was a help! It’s called TLDraw, I think.
@nickwoodward819
@nickwoodward819 9 күн бұрын
2:54: Now that's a diagram that should be in the docs :)
@CodinginPublic
@CodinginPublic 9 күн бұрын
Haha glad it was helpful!
@tiscover
@tiscover 9 ай бұрын
As always - great video Chris! Is there a way that Astro only renders "new" content? This would be really helpful in combination with a CMS: Let's say a client changes some text in the CMS and Astro does not generate the whole site, but only the text that was changed. Thanks anyway
@CodinginPublic
@CodinginPublic 9 ай бұрын
Not to my knowledge. SSR or SSG is all at the page level (meaning you have to decide for the whole page). Perhaps in the future? I don't know if anyone even does that sort of thing?
@javayhu
@javayhu Ай бұрын
Fantastic explanation, thanks a lot. I wondered that if there is a way to implement /posts/[id].astro to support both SSG and SSR? Let's say I have 10,000 blog posts, and we only do SSG if id is
@qasimarif9921
@qasimarif9921 6 ай бұрын
Hey! Love the content man. This was great to watch. I’ve got a mostly static site I’m building in Astro but plan to use some React for components and some packages. Thing is React is quite heavy in size and I’m trying to keep it as light as possible. Would I benefit from using SSR here at all to avoid React being called on the client side? (And avoid that 100kb load as it’s called and rendered on the server?)
@CodinginPublic
@CodinginPublic 5 ай бұрын
You’re welcome! Well, if you’re using react, it’ll still load react on the page if you build it server side. You could use the client:visible directive to ensure the react only loads if people get to a section on the page that needs it?
@sistana
@sistana 7 ай бұрын
Thanks, very helpful, I want to know a litle about islands and midleware in Astro
@CodinginPublic
@CodinginPublic 7 ай бұрын
Cool! I'll plan a tut! Thanks for saying something!
@nikkehtine
@nikkehtine 4 ай бұрын
Nice video
@CodinginPublic
@CodinginPublic 4 ай бұрын
Glad you enjoyed it!
@ctrlteam5168
@ctrlteam5168 8 ай бұрын
I really like Astro, I have a question. What is Astro's current positioning? Is it SSR service or spa single page application or SSG? Where is the center of gravity of Astro? Thank you.
@CodinginPublic
@CodinginPublic 8 ай бұрын
So right now it’s geared towards MPAs. While it defaults to using SSG, you can easily use SSR as I show here. You can create a SPA experience using react or something but at that point it would make more sense to just use Next or something that is react-only. I do have a few Astro sites with an admin section that is completely SPA in that route. I just use react router dom for that section to do all the internal routing. Hope that helps.
@onorlidmedina
@onorlidmedina 8 ай бұрын
Great video, can you make a video about foms with astro? Thank you
@CodinginPublic
@CodinginPublic 8 ай бұрын
Glad you liked it! What would you like to know about forms?
@eannadefreine6671
@eannadefreine6671 9 ай бұрын
Really interesting video. I wonder what happens when you have a component on every page, a footer for example, that needs to be SSR. Is it still possible to benefit from SSG for the actual route no just SSR the footer?
@CodinginPublic
@CodinginPublic 9 ай бұрын
Currently it’s all page level, meaning you have to decide SSR or SSG for an entire page. Perhaps there are plans to change that in the future? I'm not sure if any frameworks are offering that though?
@user-bn5eb9um4x
@user-bn5eb9um4x 8 ай бұрын
Which UI framework deliver the less amount of JavaScript in your experience? I still can't make up my mind whether to use Preact or Svelte. But no Alpine as I didn't want to littering my markup.
@CodinginPublic
@CodinginPublic 7 ай бұрын
I don't know that I have a recommendation between those two. I would guess Svelte? But that's merely a guess. I'd think both would be quite quick for most apps though?
@user-bn5eb9um4x
@user-bn5eb9um4x 7 ай бұрын
@@CodinginPublicTrue, those are familiar with, I'm just so familiar with vanilla. If only we can solve the last piece of the tetris colors, the "red" UI framework being missing, no Ember or Angular. Maybe Astro should have one for client-side.
@richardramirez5746
@richardramirez5746 2 күн бұрын
have you made astro work in old browsers using legacy vite?
@CodinginPublic
@CodinginPublic 2 күн бұрын
I haven’t! What are your needs?
@richardramirez5746
@richardramirez5746 2 күн бұрын
@@CodinginPublic When using Astro with vite legacy plugin, legacy scripts are generated in fact, but they do not get injected into page as Vite does when working without Astro. So my concern is having a non-running page in old browsers.
@inujung8224
@inujung8224 3 ай бұрын
i think the diagram for const prerender is kinda opposite here? for SSG prerender should be true and SSR it should be false.
@CodinginPublic
@CodinginPublic 3 ай бұрын
I don't remember what my diagram mentioned, but prerender only works when you're already in SSR mode (either "server" or "hybrid"). In that case, "server" makes everything NOT prerendered by default and you have to pass prerender = true to change that. "Hybrid" is the opposite. Hope that helps!
@TheBuddilla
@TheBuddilla 8 ай бұрын
My islands will be htmx LOL
Astro CMS for Visual Editing: Getting Started with CloudCannon
1:13:21
Coding in Public
Рет қаралды 7 М.
Which one will take more 😉
00:27
Polar
Рет қаралды 60 МЛН
Barriga de grávida aconchegante? 🤔💡
00:10
Polar em português
Рет қаралды 13 МЛН
AstroDB might be the easiest SQL setup you can get
9:15
Web Dev Cody
Рет қаралды 11 М.
Do you REALLY need SSR?
18:15
Theo - t3․gg
Рет қаралды 154 М.
(NEW!) Optimize Image Features in Astro 3.0
18:32
Coding in Public
Рет қаралды 7 М.
👋 Goodbye, CoPilot!  Hello, Codeium!
7:46
Coding in Public
Рет қаралды 14 М.
Angular 17 SSR - Angular Server Side Rendering in a New Way
13:54
Monsterlessons Academy
Рет қаралды 25 М.
Is Astro A Game Changer For Nuxt and Vue Developers?
24:41
Program With Erik
Рет қаралды 11 М.
React Server Components vs SSR
5:36
Kodaps Academy
Рет қаралды 9 М.
Astro makes websites faster & easier to build
22:55
Kevin Powell
Рет қаралды 114 М.
How to Optimize Images in Astro
13:24
Coding in Public
Рет қаралды 9 М.
У кого круче наклейки?
0:49
Li ALINA
Рет қаралды 1,6 МЛН
Fiz uma música com coisas aleatórias?!😱 #shorts #challenge
0:30
Gabrielmiranda_ofc
Рет қаралды 7 МЛН
GADGETS VS HACKS || Random Useful Tools For your child #hacks #gadgets
0:35