- page.ts is routed by Vite for every HTTP request for SSR and then it will fetch() data over backend API
- If rendered in the client, fetch() hits directly the backend API
- Both cases the template is rendered using the same logic (Svelte HTML templating, CSS, JS)
- You are going to need a template language any cases, like Django's one. Alternative way to think this is that SvelteKit is just a super powerful template engine.
SSR calls your backend APIs and renders templates.
Example from SvelteKit page.ts here:
https://github.com/tradingstrategy-ai/frontend/blob/master/s...
Some remarks
- page.ts is routed by Vite for every HTTP request for SSR and then it will fetch() data over backend API
- If rendered in the client, fetch() hits directly the backend API
- Both cases the template is rendered using the same logic (Svelte HTML templating, CSS, JS)
- You are going to need a template language any cases, like Django's one. Alternative way to think this is that SvelteKit is just a super powerful template engine.