Why I decided to make my site with SvelteKit


6 reactions 2022-02-27

Illustration of best framework for create a website

My preferred tech stack list:

1. Gatsby

Gatsby is based on react js, I used to make a simple blog using this. With the SSG (Static Site Generator) technique, creating a site that uses Gatsby, will load content very quickly. But what I’m not happy about is that Gatsby uses GraphQL to retrieve data from various CMS, because they have to learn more and unfortunately there’s no time to do that.

2. Next JS

Next JS is also based on React. In my opinion, this is cooler than Gatsby, because it has a lot of cool features. Among them are image optimization (Gatsby also has this), font optimization, fast refresh, etc. Next JS will actually be my second choice, but let’s talk about the others first.

3. Remix

Remix based on React, does not support SSG. But if you look at the comparison Remix vs Next JS, you will be confused again later to choose between the two. You could say Remix >= Next JS!. Why Remix can be faster than Next JS? even though there is no SSG feature? That’s because Remix uses the http caching / swr strategy (stale-while-revalidate, but not the one from Vercel). And yesterday it made me confused too. I’ve made the blog with Remix and Notion API, but the problem is when I deploy it, I’m confused. Deploy to Cloudflare always gets the error “process is not defined”, I don’t know how to do it, so I ended up skipping it and looking for other alternatives.

4. SvelteKit

This is based on Svelte (new framework), this is predicted to be able to convert our code into optimized code to vanilla javascript, and also the size of our web page will be smaller for download. And based on what I read from Swyx’s blog, he said ”Svelte for Sites, React for apps”. What I think makes sense with a strategy like that, in the end, without thinking about it, I immediately used SwyxKit from Swyx’s.

Final Choice

Finally, at this time I tried and chose SvelteKit, that’s because from the Swyx starter kit, I think it’s complete enough to make a blog. It’s undeniable that I might move the stack again, but right now I’m trying to start a blog, and focus on the content first. Because I’m too focused on the technology, so the content isn’t made up