Lazy loading / data evaluation with passable context #1332
danmatthews
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've just started using
Inertia::lazy
in my Laravel apps to speed up initial page load for our users - it's a fantastic bit of code because it gives me a faster initial page load, and I don't have to write another endpoint, think about naming a route, or writing a normalaxios
orfetch
request for it.One thing i think that could be cool though, would be the ability to pass parameters into lazy partial reloads:
(examples in Svelte as that's what we're using currently!)
This would then simply pass the data through to the closure (example of Laravel style usage here:)
This could allow even more useful SPA-style context and content changes using partial reloads.
Beta Was this translation helpful? Give feedback.
All reactions