[docs] clarification on how `data` resolves keys with the same name
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the bug
If multiple load functions return data with the same key, the last one ‘wins’
https://svelte.dev/docs/kit/load#Layout-data
Q1: What does "last one" mean? how are load functions ordered? This is confusing as another section mentions that they run in parallel.
Q2: Are load functions ordered differently during SSR vs CSR. Are the following statements correct?
- In SSR, all load functions run in parallel
- In CSR, all server load functions then all universal load functions
Reproduction
.
Logs
System Info
.
Severity
annoyance
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked SvelteKit documentation sections for Layout data and Parallel loading. Trace the documented load-function behavior for key collisions and SSR versus CSR, then update the documentation so ordering and execution semantics answer Q1 and Q2 unambiguously.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100