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

Поділитися
Вставка
  • Опубліковано 11 жов 2024

КОМЕНТАРІ • 26

  • @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!

  • @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/

  • @portersmith9101
    @portersmith9101 11 місяців тому +1

    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  11 місяців тому +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

  • @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!

  • @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

  • @dzienisz
    @dzienisz 6 місяців тому

    thanks for this video

  • @MateusCarvalho-x6y
    @MateusCarvalho-x6y 7 місяців тому

    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?

  • @ilirbajrami2902
    @ilirbajrami2902 6 місяців тому

    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  6 місяців тому

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

  • @nickwoodward819
    @nickwoodward819 11 місяців тому

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

    • @JamesQQuick
      @JamesQQuick  11 місяців тому

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

  • @ChristianKolbow
    @ChristianKolbow Рік тому

    👍

  • @vishalsangole836
    @vishalsangole836 11 місяців тому

    learned a loooooooooooooooooooooooot !

  • @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!

  • @dannyisrael
    @dannyisrael Рік тому

    I assume this is NextJS 12

    • @JamesQQuick
      @JamesQQuick  11 місяців тому

      Well, the Server Components piece is 13+

  • @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