Basic Command

Let's create a basic Command that inrements and decrements a number. It's simple and contrived but will demonstrate some high level concepts.

With Turbo Frame

Without Turbo Frame

Counter

In this demo, the counter value or "state" is managed by the User model. It is persisted to the database and used when rendering the page.

0000

Was this helpful?

I hope TurboBoost helps you get better at Hotwire while teaching you some cool new tricks... because this stuff is fun and addictive. Check out the test/dummy app on GitHub to see how this site was made, and please consider supporting my efforts.

Sponsor TurboBoost