Svelte · Senior · Question 49 of 75
Where should UI state like filters or the current tab live if it must survive reloads and be shareable?
- ✓Correct answer: In the URL (search params), read in
loador viapage.url - 2In component
$stateonly - 3In a global store
Explanation
URL state works with SSR, back/forward navigation and copy-pasted links.