Hotwire Discussion

Real-time search with Rails + Hotwire

Hi, just want to share about tinkering with hotwire

I built this to demonstrate the ability we can achieve with hotwire.

To view the repo, click here.

Any ideas to improve are welcomed. May be some patterns or best practices are welcomed for discussion.

Also, I update on Twitter @RicardoSawir. You can follow me there.


Neat, I just built exactly this myself for a feature! Was super happy with how simple and easy it ended up being.

Any ideas to improve are welcomed.

If this is a real project, you might want to consider debouncing your refresh() function so you’re not spamming your server on every key press.


This is a temporary Safari issue where formElement.requestSubmit() is not supported. The easiest fix is to use a polyfill until the next Safari update where this has been resolved.