Converting a NextJS App to Laravel Livewire

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024
  • You might be surprised to learn that I think React Server Actions and React Server Components are a step in the right direction. In fact, I think it means there's even less of a learning curve if you're wanting to jump into Laravel because Laravel Livewire (specifically Volt) has a very similar DX feel to NextJS Server Actions and Server Components.
    So, after I watched a video from ‪@leerob‬ showing off Server Actions and Server Components, I wanted to show what the same application might look like... in Laravel and Livewire.
    Links:
    Original Video: • The blazing fast emoji...
    NextJS repo: github.com/rau...
    Livewire repo: github.com/jos...
    Keep creating.
    ---
    📹 *Watch My VSCode Setup Video:* • My Minimal and Beautif...
    🎓 *Make VSCode Awesome - Caleb Porzio's Course (support me with this link):* gumroad.com/a/...

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

  • @alexandersix_
    @alexandersix_ 3 หลายเดือนก่อน +17

    Love your niche of guiding JS developers into Laravel!

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +3

      Thanks Alex! Some people might think it would be weird not to get JS developers to use React / Vue in Laravel. I think there's some who like that idea, but even with Inertia it still seems too "separated" for people really leaning into stuff like RSC / Server Actions.
      I think Livewire is a great bridge, even if there are syntax differences.

    • @codernerd7076
      @codernerd7076 3 หลายเดือนก่อน +1

      ​@@joshcirre not sure if you bringing them to the light or dark side yet 😅

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +3

      Maybe both? 😁

    • @Soulis98
      @Soulis98 3 หลายเดือนก่อน

      @@codernerd7076 He's the guide to the promise land.

    • @1nickwild
      @1nickwild 3 หลายเดือนก่อน +1

      Yes I agree. Would love more of this content

  • @JonBrookes
    @JonBrookes 3 หลายเดือนก่อน +3

    Brilliant. Nice to see this as a comparison with nextjs. There is so much laravel has to offer by way of Auth out of the box. This makes life so much easier. More like this video will always be well received in my book. Thanks again

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +2

      Thanks Jon! Especially for the encouragement and guidance. I'll try to make more like this one. :)

  • @blabla-kk8bl
    @blabla-kk8bl หลายเดือนก่อน

    Django developer here and fascinating to see how SSR frameworks actually perfect for web development, those JS developers always doing web development in a wrong and hardest way.

  • @jacquescoertze1101
    @jacquescoertze1101 3 หลายเดือนก่อน +2

    Great video overall. Love the ideas at the end around rate limiting + deployment. The deployment journey especially could be facinating to show and lesrn more about.
    It's also important to note that in the app thus far, no external dependencies have been generated. You own the DB, and the auth - at least locally so far. Now yes, in NextJS, you could have Lucia and a local DB, but the setup time likely would be far greater.

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +2

      Good point! I actually did deploy on Laravel Forge with a Hetzner server so it's up and running live here:
      emoji-todo.joshcirre.com
      I should record how I set that up, but nothing really changed from the code itself. It "just works".
      The rate limiting is something I need to dig in more on how to do this myself for this method without limiting the entire application. But once I do that, I think it would be a great "second" video. ☺️

  • @andreasscheller3920
    @andreasscheller3920 3 หลายเดือนก่อน

    Cool, thanks - the thing with authenticated User adding is so simple in Laravel - and also your approach in showing the easy path from next.js to Laravel 😀

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +1

      It is crazy how easy authentication is huh? That's one of the main reasons I switched to using Laravel. And I'm glad that it was helpful for you. :)

  • @aadityathapa
    @aadityathapa 3 หลายเดือนก่อน +2

    can you make a video on how you made your vs code setup look like that? I really love the fonts, themes and how simply minimalistic it looks.

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +1

      It's pretty well voted on my Suggest.gg (cir.re/suggest) so that might be coming up in the pipeline. 😁

    • @mohdsajidshaikh4291
      @mohdsajidshaikh4291 3 หลายเดือนก่อน

      ​@@joshcirreplease make it

  • @1nickwild
    @1nickwild 3 หลายเดือนก่อน

    Great content here!

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน

      Thank you! It seems like there are a lot of people who agree too. I'll have to do more of these! ☺️

  • @seyidtakele8158
    @seyidtakele8158 3 หลายเดือนก่อน

    I am in the inertia side, but like your video to attract js devs to laravel ecosystems

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน

      Thank you! I love Inertia too, but I definitely am quicker in the Livewire land. :)

  • @keynertyc
    @keynertyc 3 หลายเดือนก่อน

    Espectacular, gracias!

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +1

      Thank you! ☺️

  • @cesarkollenphowet
    @cesarkollenphowet 3 หลายเดือนก่อน +5

    I'm still waiting for the video about how you styled your vscode 🤣

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +2

      It's coming! 😅

  • @scott_itall8638
    @scott_itall8638 3 หลายเดือนก่อน

    Dumb question, what if you want them to transition in nicely ie one slides down top one fades in. Svelte has an in/out option you can apply based on a boolean. Is there something similar to this approach?

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน

      Great question! Livewire does have built in Animation that has some basic parameters. livewire.laravel.com/docs/wire-transition
      But additionally, things like AutoAnimate is a great option with minimal setup.

    • @rand0mtv660
      @rand0mtv660 3 หลายเดือนก่อน

      Unfortunately looks like this use case doesn't work with Livewire.
      "There is currently no way to transition dynamic lists in Livewire using wire:transition."

  • @shubhamsahuSD
    @shubhamsahuSD 3 หลายเดือนก่อน

    Awesome ❤

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +1

      Thank you! I'm glad you found it helpful. ☺️

  • @Ivcota
    @Ivcota 3 หลายเดือนก่อน

    Great share Josh!

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +1

      Thank you. I appreciate you watching. ☺️

  • @mikeeomega
    @mikeeomega 3 หลายเดือนก่อน

    What's the package of icons of your vscode?

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน

      This is the Catppuccin Frappé theme. ☺️

  • @charlesheon2658
    @charlesheon2658 3 หลายเดือนก่อน +2

    Am I crazy or are we hearing crickets in the background ahah?
    Great video otherwise.
    Makes me want to try to build projects with Laravel

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน +1

      You are probably not crazy. The downsides of recording in my garage. 😂

  • @rand0mtv660
    @rand0mtv660 3 หลายเดือนก่อน

    18:35 this is not actually 100% true, or you just worded it a bit wrong. Any HTML button element inside a form without explicit "type" is actually a "submit" type by default. This means you can have multiple submit buttons inside a form, not just a single one. Not sure why would you require multiple buttons, but it's possible to do.
    One neat trick as well is that you can actually bind buttons outside a form to be the submit button for a particular form. Set "id" attribute on the form element and then put the value of that id inside "form" attribute on a button that lives outside that form. That way that button will be associated with the form and actually trigger form's submit event even though it's placed outside the form. Found this quite useful in many situations like modals where submit button might be located in the footer of the modal, but actual form is in the body of the modal and not wrapping the button in any way. It uses native HTML and doesn't require me to bind click handlers to that button manually.
    Great video, loved this comparison.

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน

      Thanks for teaching me something. Seriously! I didn't know about the buttons outside of the form or that a button without a type is "submit" but default. I guess I've always added type="submit" to my buttons. 😂
      That's awesome. And Thank You for watching. That means a lot. ☺️

    • @rand0mtv660
      @rand0mtv660 3 หลายเดือนก่อน +1

      @@joshcirre No problem, we are all here to learn. To be honest I think adding explicit type="submit" might not be a bad idea to convey intent in clear way. I usually like explicit code if it's not ridiculously verbose and I think this is not.

  • @AyorindeAdesugba
    @AyorindeAdesugba 3 หลายเดือนก่อน

    Thanks. The nextjs version loads a custom font.

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน

      You're right. Good catch! Fairly easy to do with Laravel as well, even if you didn't want to load it via URL.

  • @Soulis98
    @Soulis98 3 หลายเดือนก่อน

    Salvation!

  • @AbdelrahmanMoussaAbuOuf
    @AbdelrahmanMoussaAbuOuf 3 หลายเดือนก่อน

    Premium content ❤

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน

      Thank you. 😊

  • @thomas2448
    @thomas2448 3 หลายเดือนก่อน

    Your content is great but not a fan of the green screen. It's distracting and I notice I quit watching almost immediately. Which is a shame.

    • @joshcirre
      @joshcirre  3 หลายเดือนก่อน

      Thanks for the feedback. I’d rather record and publish as many videos as I can even if I’m not in my default “studio”.
      I record these ones in my garage. :)