2 ms·
This looks very different from LiveView. In particular, as explained in Livewire's documentation on state management [1], state is either stored in a back-end s
by mwcampbell 7y ago
This looks very different from LiveView. In particular, as explained in Livewire's documentation on state management [1], state is either stored in a back-end service like Redis, or re-sent to the server with each request, depending on the type of property. And according to the home page, Ajax requests are used. With LiveView, a persistent WebSocket connection is used, and state is stored in memory in an Erlang process.
[1]: https://laravel-livewire.com/docs/state-management/ https://laravel-livewire.com/docs/state-management/
- francislavoie 7y agoIt was initially implemented with websockets but that meant having to actually run a websocket server alongside the PHP app to work. Caleb went the simple route by just sticking to AJAX instead. It's a difference in how PHP is typically run (mod_php or fastcgi) vs how Erlang runs (standalone server). On his blog, he posted some videos earlier this year about the process of coming up with what eventually became Livewire, as well as a bunch of discussion on his podcast No Plans To Merge.