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!
Popular Frontend topics

JavaScript is no longer to be feared or loathed—the world’s most popular and ubiquitous language has evolved into a respectable language....
New

DHH might like you to believe they are a thing of the past:
https://twitter.com/dhh/status/1275902566719610880
I actually went down thi...
New

Another WebAssembly Frontend Framework for Rust :nerd_face:
Seed is a frontend Rust framework for creating fast and reliable web apps w...
New

Anyone have any thoughts about Preact?
They’re saying it’s a “Fast 3kB alternative to React with the same modern API”…
A different kin...
New

SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. ...
New

ThinScript
ThinScript is an experimental programming language that compiles to JavaScript, WebAssembly, and C. It’s meant to be a thin la...
New

Local PDF uses Webassembly to edit your PDFs inside your Browser. Your files won’t leave your System, they will not be sent to another se...
New

What does svelte offer that React or Vue doesn’t?
New

Hello,
This is pretty basic. I was trying to explore the front-end development as I was not from a tech background. But, very much inter...
New

Welcome to @actionforms_io :rocket:
No code - No backend Form sender for developers
Send your without a backend
Join now: https://www...
New
Other popular topics

Any thoughts on Svelte?
Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New

I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New

SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New

Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
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

Do the test and post your score :nerd_face:
:keyboard:
If possible, please add info such as the keyboard you’re using, the layout (Qw...
New

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

Author Spotlight: Mike Riley (@mriley)
This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s bo...
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...
New

This is cool!
DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON
We just witnessed something incredible: the largest open-s...
New
Latest in Frontend
Latest (all)
Categories:
My Saved Portals
-
None saved yet
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /v
- /react-native
- /wasm
- /security
- /django
- /nodejs
- /centos
- /haskell
- /rails
- /fable
- /gleam
- /swift
- /js
- /deno
- /assemblyscript
- /tailwind
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /preact
- /flutter
- /c-plus-plus
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /vuejs
- /nim
- /emacs
- /nerves
- /elm