Our app uses both Livewire (dashboard / basic crud stuff) and Vue (a complex visual editor). We have a separate frontend team so we avoid Volt - it's much easier for the JS devs to tweak Livewire views if the PHP logic is in separate files. Safer too, because they never touch the classes and can't accidentally break anything. It's a nice option for PHP-only teams though.
It all depends on the project and on the teams working on that project. At our company, it always depends on the scale of the project. I would like to see how far we can go with this. Most of the time we're using normal Livewire (separate files for PHP and blade) or completely headless.
The problem is when we need add some more complexity in component features. I think that merge logic layer with front-end layer is not a good decision, only to small projects or small features.
I was not much of a fan of volt until I started having an actual use for it: I initially write the class-based backend codes directly on blade and test it more easily before moving it to the backend when I'm done with the code. It's kinda dumb and funny but it made coding for livewire easier and I don't have to be forced to use volt in production so I still maintain the same separation of concern I've gotten used to.
Our app uses both Livewire (dashboard / basic crud stuff) and Vue (a complex visual editor). We have a separate frontend team so we avoid Volt - it's much easier for the JS devs to tweak Livewire views if the PHP logic is in separate files. Safer too, because they never touch the classes and can't accidentally break anything. It's a nice option for PHP-only teams though.
It all depends on the project and on the teams working on that project.
At our company, it always depends on the scale of the project.
I would like to see how far we can go with this. Most of the time we're using normal Livewire (separate files for PHP and blade) or completely headless.
The problem is when we need add some more complexity in component features. I think that merge logic layer with front-end layer is not a good decision, only to small projects or small features.
It all depends on the project at hand indeed.
Hey can you make an crud tutorial for laravel tall stack with volt class?
It's on my list, but I need to find some extra time. Thanks for watching!
I was not much of a fan of volt until I started having an actual use for it: I initially write the class-based backend codes directly on blade and test it more easily before moving it to the backend when I'm done with the code. It's kinda dumb and funny but it made coding for livewire easier and I don't have to be forced to use volt in production so I still maintain the same separation of concern I've gotten used to.
That's a great tip btw.
I use them whenever it feel right. So basically it's a healthy mix of both.
Is it safe? I want to rebuild my livewire blog app. But my concern they merge client and server thing in one file.
Yes, I use it in production for small things.
in me project volt lazy load not working
Maybe you have an js issue somewhere preventing it. You should check the documentation for this issue I guess.
So much more easy than React and I can use PHP.
Glad you liked it!