TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How Laravel Livewire works

116 pointsby clementmasover 3 years ago

16 comments

michaelanckaertover 3 years ago
I recently started using htmx (<a href="https:&#x2F;&#x2F;htmx.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;htmx.org&#x2F;</a>) in combination with Django and have become a firm believer of sending HTML &#x27;over the wire&#x27; instead of JSON structures that then get used client side.
评论 #28851370 未加载
评论 #28851138 未加载
评论 #28854559 未加载
评论 #28851062 未加载
评论 #28851861 未加载
评论 #28853506 未加载
评论 #28852075 未加载
jjdeveloperover 3 years ago
I feel that the simplicity of just building on the server and pushing the updates across the wire is where we are heading. So a lot less double up, with regards needing to write both for the server and client. Validation especially will just need to be written once.<p>Although I do feel Phoenix Liveview is a better option because they implement sockets.<p>Also saw this update today they will allow you to trigger javascript on the client without the sever round trip, it&#x27;s one of the things people get a bit stuck understanding. Generally they think to pop open a modal or menu requires a round trip to the server but really you should be using Alpine.js or similar for such things. This new pending update remove the requirement of needing a framework like Alpine. <a href="https:&#x2F;&#x2F;github.com&#x2F;phoenixframework&#x2F;phoenix_live_view&#x2F;pull&#x2F;1663" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;phoenixframework&#x2F;phoenix_live_view&#x2F;pull&#x2F;1...</a>
评论 #28851746 未加载
louissm_itover 3 years ago
Awesome. I’m noticing a ton of “alternative” front end development tools these days: Hotwire, Stimulus Reflex, LiveView, Livewire, etc.<p>However I don’t think javascript is the fundamental blocker. When people say they dislike building SPAs, they probably mean they dislike APIs and the whole circus of double validations, error catching, form handling and cache invalidations that come with a React&#x2F;Vue SPA.<p>Inertiajs[1] is a really solid middle ground of MVC goodness and client side interactivity.<p>[1] - <a href="https:&#x2F;&#x2F;inertiajs.com" rel="nofollow">https:&#x2F;&#x2F;inertiajs.com</a>
montblancover 3 years ago
Will we see a bit less SPAs and more of this? Rails has come up with Hotwire. ASP has something similar I think...only questions is what CTOs will make of this. And front end devs who are super used to doing SPAs won&#x27;t like this change I fear.
评论 #28850254 未加载
评论 #28855352 未加载
评论 #28850298 未加载
评论 #28850135 未加载
clementmasover 3 years ago
I&#x27;m really into the idea of HTML over-the-wire, with Blade templates and PHPUnit tests. No need to split the logic between the backend and the frontend. However I still need SPA navigation and although there&#x27;s a Turbo adapter [0], it looks like more of a prototype at the moment.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;livewire&#x2F;turbolinks" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;livewire&#x2F;turbolinks</a>
mandsover 3 years ago
For Django users, see <a href="https:&#x2F;&#x2F;www.django-unicorn.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.django-unicorn.com&#x2F;</a> - which is pretty much a port of LiveWire.
评论 #28858583 未加载
评论 #28852196 未加载
plucover 3 years ago
Laravel abstracted the PHP language enough that there are &quot;Laravel developers&quot; who cannot work without a framework. Now, these gems are going to do the same thing with HTML and Javascript!<p>These tools are contributing to the lowering of code quality standards, regardless of their intentions or the rigidity of their coding standards. They&#x27;re good tools once you understand how they work, but most of its users use it precisely so they don&#x27;t have to.
评论 #28851792 未加载
评论 #28852692 未加载
dncornholioover 3 years ago
As a Laravel user, I still avoid Livewire like the plague. Way too much &#x27;magic&#x27; and it&#x27;s not solving any of my real problems. I don&#x27;t want to waste time learning Livewire because I really don&#x27;t need to. Same goes for Laravel Breeze, Jetstream, Inertia, i&#x27;m sure they&#x27;re great but I don&#x27;t need any of it and they are becoming a thing that gets in the way more and more..
评论 #28849870 未加载
评论 #28849961 未加载
评论 #28849881 未加载
评论 #28850336 未加载
评论 #28850686 未加载
Errancerover 3 years ago
How similar is this thing to the Phoenix.LiveView?
评论 #28849824 未加载
评论 #28849664 未加载
ch4s3over 3 years ago
I’m sitting at ElixirConf listening to Chris McCord talking about new features in Phoenix LiveView.
评论 #28854192 未加载
_kyranover 3 years ago
Has anyone used both Livewire and Hotwire&#x2F;turbolinks and can compare their experiences?
clementmasover 3 years ago
Github repo: <a href="https:&#x2F;&#x2F;github.com&#x2F;livewire&#x2F;livewire" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;livewire&#x2F;livewire</a><p>Website: <a href="https:&#x2F;&#x2F;laravel-livewire.com" rel="nofollow">https:&#x2F;&#x2F;laravel-livewire.com</a>
submetaover 3 years ago
This is great. It inspired many frameworks to come up with similar solutions. Here is one for Python&#x2F;Flask:<p><a href="https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;Flask-Wire&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;Flask-Wire&#x2F;</a>
评论 #28874612 未加载
stanmancanover 3 years ago
I use Livewire quite extensively in production and it’s great. As someone that never got into Vue&#x2F;React it has allowed me to build some pretty awesome and interactive UI’s.
评论 #28851860 未加载
earthboundkidover 3 years ago
Alpine.js is great. It is my goto for JavaScript now. It really hits the sweet spot.
aasasdover 3 years ago
That title is a mouthful even when just subvocalizing it.