Svelte 5 runes, component patterns, reactivity, and SvelteKit data loading best practices
99
99%
Does it follow best practices?
Impact
99%
1.11xAverage score across 10 eval scenarios
Passed
No known issues
A social media startup needs a Svelte 5 feed component that loads posts incrementally as the user scrolls. The component should show a list of posts, detect when the user has scrolled near the bottom, and automatically fetch the next page. It must also update the browser's document title to reflect the number of unread posts.
The product team wants the scroll detection to capture the container's current scroll height before each batch of new posts is inserted, so the scroll position can be preserved after the DOM updates. They also want any reactive state used for debugging purposes to be easy to instrument during development without leaving console.log calls in the production build.
The component receives a onpostclick callback from its parent so the parent knows which post the user opened.
Produce a single file: PostFeed.svelte
The component should:
document.title reactively when the unread count changesAlso produce notes.md explaining which effect rune was chosen for which purpose and why.
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
skills
svelte-best-practices