Directing Turbo Native apps from the server
This post was extracted and adapted from The Rails and Hotwire Codex. It also assumes some familiarity with Turbo Native.
When developing for the web, we can send the user to any location during a web request using an HTTP redirect (
3xx
status codes). Turbo Native effectively wraps the website within native navigation. This means a redirect may not always do the trick.Let's take an example. A Login screen is presented modally in the native apps. After a successful login, we want to redirect the user to the home page. In the app, we'd want to dismiss…