Consider a SvelteKit app with a route group folder named (admin) containing a page dashboard.svelte. What URL path will render this page?
src/routes/(admin)/dashboard.svelte
Route groups in parentheses do not add to the URL path.
Folders named with parentheses like (admin) group routes without adding to the URL path. So dashboard.svelte inside (admin) is accessible at /dashboard.
Which folder name is NOT valid for a route group in SvelteKit?
Route groups must be wrapped in parentheses, not square brackets.
Route groups use parentheses like (group). Square brackets [group] are used for dynamic parameters, not groups.
Given this folder structure in SvelteKit:
src/routes/(app)/(dashboard)/stats.svelte
What URL path will render stats.svelte?
Route groups do not add segments to the URL path, even when nested.
Both (app) and (dashboard) are route groups and do not add to the URL. So stats.svelte is accessible at /stats.
In a SvelteKit app, a developer creates a folder named (admin-panel) with a page index.svelte. The URL /admin-panel returns 404. Why?
src/routes/(admin-panel)/+page.svelte
Think about how route groups affect URL paths.
Route groups are invisible in the URL. So the URL '/admin-panel' looks for a folder named 'admin-panel' without parentheses. Since it doesn't exist, 404 occurs.
Why would a developer use route groups (folders with parentheses) in a SvelteKit project?
Consider how route groups affect URLs and project structure.
Route groups help organize files and layouts without adding extra parts to the URL path. They keep URLs clean while allowing folder grouping.