Hotwire (3 blogmarks)
← BlogmarksMaking Tables Work with Turbo
https://www.guillermoaguirre.dev/articles/making-tables-work-with-turboThis article shows how to work around some gotchas that come up when using Turbo with HTML tables. The issue is that despite how you structure your HTML, some elements like <form> get shifted around or de-nested by the HTML rendering engine.
Some of the key takeaways:
- take advantage of the dom_id helper
- stream to an ID on a standard tag without necessarily having added a turbo_frame_tag
- use of remote form submission by specifying the form ID to the submit button's form attribute
GitHub - thoughtbot/hotwire-example-template: A collection of branches that transmit HTML over the wire.
https://github.com/thoughtbot/hotwire-example-templateThis is a GitHub repo I've seen recommended by Go Rails for learning and experimenting with different Hotwire features and concepts. Each branch is an example with working code to go through.
I learned about this repo from Go Rails video or one of the nearby ones.
Modern Front-End Development for Rails, Second Edition: Hotwire, Stimulus, Turbo, and React by Noel Rappin
https://pragprog.com/titles/nrclient2/modern-front-end-development-for-rails-second-edition/I learned about this book via this post from rosa.codes.
In the replies to that post are several other resources recommend by the community:
- The Rails and Hotwire Codex: Build an app for web, iOS, and Android
- Hotrails - Learn modern Ruby on Rails with Hotwire
- Master Hotwire: Master Hotwire to Build Modern Web Apps with Rails Simplicity