How to break out of a Turbo Frame and redirect? #176
sidk
started this conversation in
Submissions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When you submit a form in a Turbo Frame, the response needs to contain the frame that submitted the request. This is a good thing because it lets Turbo update only the part of the page that needs to change.
Sometimes, depending on the user state (e.g. logged out), you may need to redirect out of the frame to a different part of your app. A normal redirect won't work, because Turbo will complain that the requestor frame is not contained in the response. This article goes into how you can accomplish that.
https://www.ducktypelabs.com/turbo-break-out-and-redirect/
Beta Was this translation helpful? Give feedback.
All reactions