-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Example: Link preloading (GET-only) #223
Conversation
This will allow us to make a call without running into prefetch response incompatibility issues. We'll also move the cancelToken into an argument, so that the preloader can cancel any requests that are still preloading and are no longer relevant after a page transition.
This will allow the normal 'visit' to cancel the request after taking over.
# Conflicts: # packages/inertia/src/inertia.js
Is this still being considered? Sounds like a great improvement! |
Hey! Thanks so much for your interest in Inertia.js and for submitting this contribution. In an attempt to get on top of the issues and pull requests on this project I am going through all the older issues and PRs and closing them, as there's a decent chance that they have since been resolved or are simply not relevant any longer. My hope is that with a "clean slate" me and the other project maintainers will be able to better keep on top of issues and PRs moving forward. Of course there's a chance that this PR is still relevant, and if that's the case feel free to re-submit it. If it's a new feature and not a bug fix maybe respond here first to make sure that it's something we want to include in the library. Really not trying to be dismissive here, I just need to find a way to get this project back into a state that I am able to maintain it. Hope that makes sense! ❤️ |
@claudiodekker I think you could update this PR so it works with the current version of Inertia and re-submit it. |
although I would use mousedown and not hover |
Any chance we can pick this one back up? I really like Livewire's prefetching, it'd be nice to have it here too |
It's something we're looking at for v2 👍 |
This functionality adds a 'request manager' of sorts, which has the following behavior:
In all situations, in addition to the promise, you'll receive a cancel hook, so that if you want to cancel the individual visit.
This request manager has been implemented to pre-load GET requests on-hover (see https://instant.page/ for what it's supposed to do), as well as to cancel all 'pending' requests once the page switches.
Solves #45