Next.js vs Astro Rendering Strategies (SSG, SSR, Hydration, and Server Components)

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.พ. 2025

ความคิดเห็น • 26

  • @portersmith9101
    @portersmith9101 ปีที่แล้ว +2

    At 17:02 I could be wrong but with Astro with server mode it is a little different. When you make a await async call on the server in an Astro component, all the components and markdown underneath that Astro component making the async call will be blocked until the async call is finished. While with NextJS server components you can have a server component that can make a await async call on server and it won't block components from rendering underneath it till it's finished.

    • @JamesQQuick
      @JamesQQuick  ปีที่แล้ว +1

      I think I confirmed this Ben Holmes from Astro on a stream recently. They don’t advertise it but I’m pretty sure they’re using streaming

  • @BhargavaMan
    @BhargavaMan ปีที่แล้ว +11

    Good stuff!
    As for hybrid rendering in Astro, you can also have it the other way round. With output mode 'hybrid', pages are static by default unless you export prerender = 'false'
    I've already moved 2 production apps from React to Astro, it's very capable!

  • @karthiksalian1635
    @karthiksalian1635 ปีที่แล้ว +1

    i started using astro yesterday it is great i am currently rebuilding one of nextjs project with it one question in astro is there any way to trigger rebuild using API like using revalidatePath in nextjs

  • @haikoerinkveld4242
    @haikoerinkveld4242 ปีที่แล้ว

    Awesome explanation. I couldn't wrap my head around al the new stuff going on in the web dev space. But this video explains it! Just 👍 gonna bookmark it! looking forward to your Astro course btw

    • @JamesQQuick
      @JamesQQuick  ปีที่แล้ว

      Thanks so much for the positive feedback!

  • @ilirbajrami2902
    @ilirbajrami2902 10 หลายเดือนก่อน

    I was waiting for the equivalent for revalidating data on static pages if we make a change in the CMS but you didnt cover that. Any good resource about that?

    • @JamesQQuick
      @JamesQQuick  10 หลายเดือนก่อน

      Well, you could trigger a build of your site automatically when content is updated. Is that what you're looking for?

  • @MateusCarvalho-x6y
    @MateusCarvalho-x6y 11 หลายเดือนก่อน

    Hi James! thanks for the explanations. Could you help me with a doubt? Im using Astro + Strapi for build a project by the scratch and everything is new... Im looking for a solution to work with a Design System and when I try use a web component i get an error like "self is not defined", that cames when I find a js import from node_modules. To solve this, Im using the directive client:only and everything works. Is that correct? I mean, have a way to configure all of web component in time of build?

  • @alisherzaitov
    @alisherzaitov ปีที่แล้ว +7

    Please, please add CMS integration block in your course on Astro. Self-hosted Directus will be optimal.
    Cause no client or a blogger will make a serious project writing every post in markdown. Once you add it, I am buying ❤️

    • @JamesQQuick
      @JamesQQuick  ปีที่แล้ว +3

      haha fair enough. I'm thinking I might add a CMS section to my course. For updates, make sure to sign up for the newsletter astrocourse.dev/

  • @dzienisz
    @dzienisz 10 หลายเดือนก่อน

    thanks for this video

  • @nickwoodward819
    @nickwoodward819 ปีที่แล้ว

    When is 'build time' in this case? Can't be only when you deploy, surely?

    • @JamesQQuick
      @JamesQQuick  ปีที่แล้ว

      Well you could trigger a built locally if you wanted, but most likely you're doing it your deployment pipeline

  • @vishalsangole836
    @vishalsangole836 ปีที่แล้ว

    learned a loooooooooooooooooooooooot !

  • @ChristianKolbow
    @ChristianKolbow ปีที่แล้ว

    👍

  • @dannyisrael
    @dannyisrael ปีที่แล้ว

    I assume this is NextJS 12

    • @JamesQQuick
      @JamesQQuick  ปีที่แล้ว

      Well, the Server Components piece is 13+

  • @anasouardini
    @anasouardini ปีที่แล้ว +1

    All I hear in this video is "Astrojs is king" :)

    • @JamesQQuick
      @JamesQQuick  ปีที่แล้ว

      There's a lot to like! :) I also love Next.js!

  • @jonathangamble
    @jonathangamble ปีที่แล้ว +1

    I don't get why Astro when you can uncomplicate it... just stick with regular frameworks made for one purpose.

    • @JamesQQuick
      @JamesQQuick  ปีที่แล้ว

      What do you mean by regular frameworks?

  • @nested9301
    @nested9301 ปีที่แล้ว +1

    ahhhh i'm really depressed another framework ???? can we just stop

    • @JamesQQuick
      @JamesQQuick  ปีที่แล้ว +1

      hahaha it never ends