Hotwire (3 blogmarks)

← Blogmarks

Making Tables Work with Turbo

https://www.guillermoaguirre.dev/articles/making-tables-work-with-turbo

This 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-template

This 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.