The problem with server actions

Поділитися
Вставка
  • Опубліковано 2 січ 2025

КОМЕНТАРІ • 73

  • @igrb
    @igrb 7 місяців тому +64

    This man is the greatest product person in history... the charisma, the charm, the technical expertise!

  • @vicentealmeida1336
    @vicentealmeida1336 7 місяців тому +36

    Darn, the men not only makes good content, dunk memes on the community but manages to make insane actual production code in the process. Adopt me please

    • @bholmesdev
      @bholmesdev  6 місяців тому +28

      Sorry this component does not accept children

    • @tyu3456
      @tyu3456 6 місяців тому +1

      Ah you forgot to add the children prop in the types 😂

    • @svict4
      @svict4 6 місяців тому +1

      ​@@bholmesdevspat my coffee laughing 😂

  • @dei8bit
    @dei8bit 6 місяців тому +10

    Astro comes to solve all the details that we like .

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

    this is one aspect that i like when framework compete with each other, initially react introduce us to server action, then nextjs as an early adopter showed us how it could be implemented and what benefits it brings. then other framework (in this case astro) perfected the ideas and the implementation even more from what it learnt from nextjs. im curious as to what new things/ways the remix team will bring to the ecosystem.
    these framework will learn from other framework what works and what doesn't works and keep building upon those ideas, eventually innovating better and better ways to do things

  • @shaked1233
    @shaked1233 6 місяців тому +2

    This channel should really have much more subscribers

  • @hicoop
    @hicoop 6 місяців тому +1

    Awesome video - earned a sub. Very rarely do you see content this fun in the advanced tech world

  • @QubitGlobe
    @QubitGlobe 7 місяців тому +3

    Man I live these kind of formats! good luck with that 😆

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

    I always wanted to make a presentation exactly in this style at my job, I'm glad someone had the same idea

  • @latch909
    @latch909 6 місяців тому +1

    Wild... I gonna be trying this with a few endpoints I'm currently rolling for course enrolments and stripe

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

    Whenever you present something everybody learn it immediately haha, really nice video 🙌🏻

  • @zanec7202
    @zanec7202 4 місяці тому

    This is the best video on UA-cam
    No questions asked.

  • @thegrumpydeveloper
    @thegrumpydeveloper 6 місяців тому +1

    Haha fun way to do this. I like the dev event style.

  • @jocdiazm
    @jocdiazm 7 місяців тому +5

    Ben is on 🔥 lately

  • @huntmast
    @huntmast 6 місяців тому +4

    Well well well what's up with the intro? hahahaha well done!

  • @infiniteloop1709
    @infiniteloop1709 7 місяців тому +2

    Absolute legend!

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

    i think i fell in love with the astro corp

  • @Ben-rx5bx
    @Ben-rx5bx 6 місяців тому +1

    Great vid man, I would LOVE to know what vscode theme your using!!!

    • @bholmesdev
      @bholmesdev  6 місяців тому +1

      Thanks! It's Astro's own Houston theme marketplace.visualstudio.com/items?itemName=astro-build.houston

  • @SeanLazer
    @SeanLazer 6 місяців тому +1

    This is insane

  • @austincodes
    @austincodes 6 місяців тому +1

    Actions with a TRPC-like API! 😯🤯

  • @jamesdim
    @jamesdim 4 місяці тому

    I can't take you seriously without a turtleneck!

  • @NipunaGunathillake
    @NipunaGunathillake 5 місяців тому

    How does the progressive enhancement work here? Does astro setup a form action when pre-rendering the page?

    • @bholmesdev
      @bholmesdev  5 місяців тому

      When using React 19: all form actions will fallback to the server, and reload the page with new data. Progressive enhancement just works (TM)
      When using other frameworks: you can pass an action directly to a form's `action` attribute. This will add a little ?queryParam to tell the server which action to call for progressive enhancement

  • @MrJfergs
    @MrJfergs 6 місяців тому +1

    This might not be the most relevant place to place this concern but I have been working with astro and really enjoying it... BUT when using it with a headless CMS (which most astro sites will have) It is not very straight forward to set up a live preview or visual editing, because of the nature of SSG it seems like this is either only possible using CSR or SSR and then having to separate deploys for previews (SSR) and one for the prod site (SSG). So my maybe this is better to ask of the CMS companies to make a process to set up live editing without this level of friction? Anyways if anyone knows a way around this, or have dealt with this before let me know. I am using Sanity currently but an example with any headless CMS would be fine. Seems like once again SSR is pretty much required to do useful things.

    • @bholmesdev
      @bholmesdev  6 місяців тому +1

      This has definitely come up! Vercel is the only host I've seen "solve" this with a dedicated draft mode. Otherwise, I agree we could have some sort of SSR-only-in-preview setup docs.astro.build/en/guides/integrations-guide/vercel/#excluding-paths-from-caching

  • @kasper_573
    @kasper_573 6 місяців тому +1

    I wish safe was the default and unsafe existed as escape hatch

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

      I've heard that a few times! Also find myself using .safe more time than not. I think flipping to the default and adding an orThrow() for the alternative is a good change

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

    How do you not have over a million subscribers??

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

    so what is your choice when it comes to javascript frameworks Ben?

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

    Astro Will supports other schema libraries like valibot or effect/Schema?

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

    What a great fucking intro dude. Unbelievable 😍

  • @nazarshvets7501
    @nazarshvets7501 6 місяців тому +1

    Finally a framework which adds complete features and thinks about real developer scenarios. Not some half-backed ass shit figure out and get fucked features (I'm looking at you, nextjs)

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

    how about determinate progress by uploading file can we use it in server action?

  • @miettoisdev
    @miettoisdev 3 місяці тому

    that's some good video editing right there

  • @GuillermoFedericoMorton
    @GuillermoFedericoMorton 6 місяців тому +1

    this is amazing

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

    What is your VS code theme? :p

  • @zotoavinaandriamanamihaga6661
    @zotoavinaandriamanamihaga6661 7 місяців тому

    This is actually fire !!!!

  • @sonofdarvin
    @sonofdarvin 6 місяців тому +1

    Meanwhile php still paying the bills of deva since ages

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

      I am moderately new as a dev... a few years. I have never found a use case to make php worth it... yeah, it's in a lot of legacy code... but I can't see why someone would reach for it first anymore.

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

      @@patrickjreid Take a look at Laravel + Inertia + {insert your JS framework}. All this back-end + front-end glue code problem (and front-end routing) is basically solved.. It's pretty awesome. PHP + Laravel has a great ecosystem and the community is pretty alive, PHP is not only legacy systems and Wordpress anymore

  • @TalhaBalaj
    @TalhaBalaj 7 місяців тому +3

    why im not subbed to you, lemme just fix that

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

    Really nice!

  • @hyperbolee1060
    @hyperbolee1060 6 місяців тому +1

    Holy fuck man now this is content

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

    Love the Vsauce references

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

    How old Are you ? Good explanation 👏👏

  • @corscheid
    @corscheid 6 місяців тому +1

    I love the spectacular millennial nerd memes

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

    No Chick-fil-A sauce?!

  • @Danielo515
    @Danielo515 6 місяців тому +4

    It looks wonderful except for the disgusting requirement of ZOD and that "safe" should be the default. People must understand that exceptions need to be... The exception

    • @bholmesdev
      @bholmesdev  6 місяців тому +2

      I’m open to safe being the default! Seems most people reach for it in practice

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

      @@bholmesdev probably a getUnsafe is more clear and makes people think more about what it entails

  • @seannewell397
    @seannewell397 6 місяців тому +1

    minecraft mentioned lfgo

  • @afuzzybearsyoutubechannel2812
    @afuzzybearsyoutubechannel2812 7 місяців тому +1

    💚🔥💚🔥💚🔥💚🔥💚🔥

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

    vv good video!

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

      vv much appreciate that!

  • @avidcaster
    @avidcaster 6 місяців тому +1

    let num = isNaN(+str) ? 0 : +str;

  • @luizgarciaaa
    @luizgarciaaa 7 місяців тому

    Cloudflare is far from being the cool kid on the block..

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

      I'd beg to differ ua-cam.com/video/_dtyYDwHAIc/v-deo.html

  • @zenpool
    @zenpool 7 місяців тому

    Cornier than @t3dotgg's hair (the intro that is) 😂

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

    gooch()

  • @stianmaurstad
    @stianmaurstad 7 місяців тому

    😂

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

    How you settings in top of the vs code 🥹🥹🥹

  • @alexon2010
    @alexon2010 5 місяців тому

    In the documentation in the Routes part of Astro, it is very conventional the way it is done in NEXT, I simply hate the applied convection, it completely takes away the freedom of customizing the url, I use Vitejs and React with react-router-dom, I was able to configure it smoothly routes like any-coisas.localhost:3000/ or any-coisas.localhost:3000/slug,,, this in astro is quite annoying to configure and I don't even know how the urlr prefix would be done, something like maria.localhost: 3000/home I like having the freedom to define my routes and not pass data through parameters in the url but control via state... This was the annoying part of Astro that I've seen so far

  • @Ibrahim-fh6kv
    @Ibrahim-fh6kv 6 місяців тому

    I find Astro Design terrible, I will stick with Next.js which is industry standard SSR