
ClaudiaGiv
SSR explained in SvelteKit
Hi all,
I recently started working with Svelte and created a small app with SvelteKit in order to understand better the framework. I have a few questions about this framework to witch I haven’t found any direct answers on any source/documentation and maybe you can help me with some answers/explanations. So here it goes:
- SvelteKit has SSR and in the documentation it says: “All server-side code, including endpoints, has access to fetch in case you need to request data from external APIs.”
a. What code is server side rendered besides endpoints and how it decides this? All the code from scripts from svelte pages runs on client side or some of it runs on server side?
b. In order to make use of SSR locally you need an adapter for it or svelte starts a server on its own?
c. How the SSR works on a prod environment like Netlify for example. The netlify adapter is used for SSR (running the endpoints in a netlify function) ? If a netlify adapter is not provided, how/where would the endpoints run? - If I want to use custom netlify functions in a sveltekit project what configurations are needed (besides netlify.toml and netlify adapter) in order for netlify to recognize the functions from inside the functions directory?
- What is the difference here between SSR and prerendering? SSR is used only for endpoints and other js code and prerendering is used for generarting the html to send it to the client which will then be hydrated, with the compiled js code, also sent to the browser?
Hope is not too much and the questions are not too trivial. Still trying to understand better the JS frameworks to keep up with the progress in the JS world.
Thanks!
Most Liked

AstonJ
Did you manage to find an answer after Claudia?
Not sure if it’s any help but just noticed these tutorials in SvelteKit:
Playlist:
1
Popular Frontend topics

So I have a table of MediaItems and when that list changes, say new entries, I’d like LiveView to know about that so that the Timeline up...
New

I was watching this video by Richard Feldman (Elm core team) and he’s predicting TypeScript is going to take over the JS world:
...
New

Some resources for Spring
Home of Spring
Spring Initializr
Head First Spring with Reactor
New

hlang in 30 Seconds
hlang (the h language) is a revolutionary new use of WebAssembly that enables single-paridigm programming without any...
New

I (re-)realized I had the book “Modern CSS with Tailwind” bought, never read a page of it until today. With me being a fast reader and th...
New

Interactive periodic table showing names, electrons, and oxidation states. Visualize trends, 3D orbitals, isotopes, and mix compounds. Fu...
New
New

I invented a game of double Chess called Synergy Chess. I am not a coder. I hired someone to write the program. People can play online fo...
New

When it comes to integrating messaging features into super apps, you’ll want a reliable and efficient solution. Here are some top SMS API...
New

Does anyone know of any companies that are accepting remote work for junior front-end devs or UI designers? I’m not even looking for some...
New
Other popular topics

Reading something? Working on something? Planning something? Changing jobs even!?
If you’re up for sharing, please let us know what you’...
New

New

poll
poll
Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New

I have seen the keycaps I want - they are due for a group-buy this week but won’t be delivered until October next year!!! :rofl:
The Ser...
New

Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New

Think Again 50% Off Sale »
The theme of this sale is new perspectives on familiar topics.
Enter coupon code ThinkAgain2021 at checkout t...
New

Author Spotlight
Dmitry Zinoviev
@aqsaqal
Today we’re putting our spotlight on Dmitry Zinoviev, author of Data Science Essentials in ...
New

Author Spotlight:
VM Brasseur
@vmbrasseur
We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New

Large Language Models like ChatGPT say The Darnedest Things.
The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New

I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
Latest in Svelte
Frontend>Chat
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /svelte
- /typescript
- /crystal
- /c-plus-plus
- /kotlin
- /tailwind
- /gleam
- /ocaml
- /react
- /flutter
- /elm
- /vscode
- /ash
- /opensuse
- /centos
- /php
- /deepseek
- /html
- /zig
- /scala
- /sublime-text
- /textmate
- /nixos
- /debian
- /lisp
- /agda
- /react-native
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /django
- /spring
- /manjaro
- /diversity
- /nodejs
- /lua
- /slackware
- /c
- /julia
- /neovim