from Hacker News

SvelteKit

by vhsdev on 1/12/22, 4:48 AM with 3 comments

  • by baryphonic on 1/12/22, 9:29 AM

    I love Svelte. It's my first-choice web library these days. I will even use their online REPL to test out things like CSS techniques as a replacement for JSFiddle and the rest. Plus, I love the efficient code I get from their compiler, and how friendly Svelte is to web animations & graphics.

    SvelteKit itself is quite neat. Getting SSR essentially for free, and having only a small learning curve for routing and the vendored bundler is just awesome. When I use it for dev, I typically turn on HMR and SSR, and I am extremely productive.

  • by Glench on 1/12/22, 6:47 PM

    I don't feel like this page really does SvelteKit justice. SvelteKit is kind of like Next.js but taken to the next level. I know people using less mainstream frameworks tend to be a bit overzealous in their advocacy, but I've been using SvelteKit a bunch and I love it more than any framework I've ever used:

    - All the component/JS/CSS/HTML/endpoint plumbing is taken care of and optimized for you with no configuration. Including code-splitting per route! You can get up and running in seconds.

    - Can use the same JS/TS on the front and backends. This was always my issue with Django and Rails.

    - Server-rendered for performance and SEO with client-side hydration of components.

    - Optional client-side routing for performance.

    - Filesystem-based routes are so easy to use and maintain. Want to make a new route? Just make a new file in the /routes folder! Want to modify an existing route but don't know where to look? Just look at the url and it's the same as the folder structure! It's always annoying to have to hunt around to find code.

    - Pre-rendering aka static page generation per route! This means you can run a static marketing site and the dynamic app off the same stack. This is something I've always run into and never felt like I had a good experience with.

    - I don't know how they did it but the dev experience is blazing fast with instant hot module reloading.

    - Deploy to any static, serverless, or server host. You can make your own "adapter" for any platforms that aren't already supported.

    - Built on Svelte so super fast, tiny builds, really helpful interactive documentation, and amazing "batteries-included" developer experience. And it's mostly just the HTML/JS/CSS you already know!

    Here's more info from the Svelte blog: https://svelte.dev/blog/whats-the-deal-with-sveltekit

    And an early demo from one of the creators: https://www.youtube.com/watch?v=qSfdtmcZ4d0

    SvelteKit is still in beta and changing by the day but it's going to be awesome when they hit 1.0 and have all the kinks worked out.

    I'm so excited about it that I'm going to release my standard SaaS stack for SvelteKit: https://sveltesaas.com

  • by xixixao on 1/12/22, 5:42 AM

    This page doesn’t have the app feel, because it’s not preloading linked pages.