-
Notifications
You must be signed in to change notification settings - Fork 8
Use Turbo.fetch to prevent page refreshes bounces #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Turbo.fetch to prevent page refreshes bounces #23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @thiagoyoussef 👏.
|
Merged @jorgemanrubia! |
|
We will have to fix this in https://github.com/rails/request.js, though |
|
@jorgemanrubia just so I fully understand this, essentially, it would be ideal for request.js to always use Turbo's fetch when available, not just for a specific response kind? |
|
Ok, changing it on the request.js repo, here is the PR rails/request.js#90 |
|
Ok, released v13 of the js package https://github.com/rails/request.js/releases/tag/v0.0.13, and v14 of the gem https://github.com/rails/requestjs-rails/releases/tag/v0.0.14 |
|
Will send the follow-up PR to Fizzy, thanks guys! |
Yes, exactly. The response kind filter didn't really make sense here: we want that whenever you use this library to make fetch requests, it triggers the Turbo mechanism to prevent self-triggered page refreshes, regardless the response kind (which can't be really anticipated). Thanks for merging it 🙏 |
Extracted from fizzy as requested by @jorgemanrubia at basecamp/fizzy@ebf8490