App Shell
Интерактивная демонстрация компонентов оболочки приложения и управления состоянием.
Граница компонента
Svelte's <svelte:boundary> catches runtime errors within a component tree
and renders a fallback UI instead of crashing the entire page.
Варианты BoundaryFallback
The BoundaryFallback component accepts custom titles, descriptions, and
minimum heights to fit different contexts.
Something went wrong
3D scene unavailable
WebGL is required. Check browser support or graphics drivers.
Chart failed to render
The dataset may be too large or contain invalid values.
Страницы ошибок маршрутов
Errors that escape a boundary are caught by route-level +error.svelte pages, then error.html as the last resort.
Границы ошибок
Four +error.svelte files provide contextual recovery actions for each area:
routes/+error.svelte Root fallback — "Go home" actionroutes/app/+error.svelte Authenticated area — "Back to dashboard" with sidebar visibleroutes/auth/+error.svelte Auth flow — "Back to sign in" actionroutes/showcases/+error.svelte Showcases — contextual hints per showcase categoryВызвать реальную страницу ошибки:
Думаете, этот паттерн можно сделать лучше? Расскажите как.
Оставить отзыв