hotwired-laravel/turbo-laravel

Suggestion for an introduction project/tutorial

bilogic opened this issue · 1 comments

Hi!

I have been rewatching your youtube tutorials and reading the documentation to try and get things going, but it wasn't as easy as I thought. I mean, I have an idea of what I want to build, but not familiar with what's required exactly in a partial blade file etc.

I'm now stuck with Missing partial: non-remove Turbo Streams need a partial. and decided to take a break to drop a note here.

Instead of a full blown demo app https://github.com/tonysm/turbo-demo-app where concepts are repeated, perhaps what might work better is to have a Laravel version of https://turbo-showcase.herokuapp.com, ideally as a Laravel package that one can easily "add" to their existing project and test out.

It can include the part where it your package automatically loads the blade by convention indicated at this point in the video https://youtu.be/70fCMBNsKvs?t=379

The only reason why I'm still pressing on is I understand the scalability of the turbo approach vs the rest. Perhaps one not that often mentioned fact is, this approach allows incorporating other javascript components/libraries without having to first incorporate it into the frontend framework being used, be it Vue/React etc.

Thanks for the great work!

Yeah, I've been planning on a series of videos to demonstrate the package and Hotwire in general, just didn't have time for it yet. The idea is to build something small from scratch and showing things like how decompose the app, as well as when to use Turbo Frames or Turbo Streams or Stimulus by applying the rule of least power, and stuff like that.

That error you found is because you're using the response builders trying to return some incomplete Turbo Stream. It's missing the view/partial. All actions require a view/partial, except for the "remove" action (see the test here).