-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
docs: clarify load rerun behavior #10508
Conversation
Based on the conversations here: - sveltejs#10504 - sveltejs#8403 Any changes to the URL will cause any `load` functions that access `url.searchParams` to be rerun even if the search portion of the URL has not changed (or indeed if there are no search params in the URL.)
Update 20-load.md to clarify load rerun behavior
|
Co-authored-by: Willow (GHOST) <ghostdevbusiness@gmail.com>
hmm. are we sure this isn't a bug? I don't think we should document it if the behavior is unexpected / wrong |
I think the consensus is that this is a bug but the fix is not yet planned. Maybe we can document it but highlight it as a bug and link to the GH issues? The challenge with not documenting the current behavior is that it's fairly difficult to find unless you know what to look for, e.g. "load", "invalidate", "url.searchParams", etc. in GH. I'm hoping that the priority for a fix is elevated since the original bug addressed changing search params that were supposed to be handled by different layouts and the bug I filed is a more generic (and IMO more likely to occur) issue that happens even if the search param is not provided at all. cc @dummdidumm |
I don't think we want to add something to the docs for every issue that's in the issue tracker. It'd be better to just fix the issue |
Any update on if this issue is on the roadmap? This is blocking some advanced functionality for my app and I cannot find a way around it without needing to change the pathname structure of my URLs, (in order to move the search param into a route param.) The linked issue has it as low priority - p3-edge-case. |
Based on the conversations here:
Any changes to the URL will cause any
load
functions that accessurl.searchParams
to be rerun even if the search portion of the URL has not changed (or indeed if there are no search params in the URL.)Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.