10 years ago I launched my first Hotwire Native app in the App Store. It was called something different back then (anyone remember Turbolinks?) but a lot of the same concepts and learnings apply.
To celebrate my 10-year anniversary, here are 10 of my favorite Hotwire Native tips and tricks. These will help make your hybrid app feel more native and achieve the number one goal of Hotwire Native: leaving as much business logic on the server as possible.
This comes bundled with turbo-rails, which is included in new Rails apps by default. It returns true when the user agent includes “Hotwire Native”, which Hotwire Native automatically does for us.
Keep users signed in “forever” with a long-lived cookie. In your sign-in form, programmatically “check” remember_me, telling Devise to remember the user. Hotwire Native will automatically persist this cookie for future app launches, ensuring the user stays signed in until they manually sign out.
Set "context": "modal" in your path configuration to present forms as modals in the apps. Hotwire Native handles the presentation, dismissing, and navigation to and from these forms automatically.