DEV Community

Cover image for My Journey with Svelte: From Vue to Svelte and the Joy of Pure JS Libraries
tinkerbaj
tinkerbaj

Posted on

My Journey with Svelte: From Vue to Svelte and the Joy of Pure JS Libraries

I apologize for my absence over the past few days. I've been incredibly busy, but I'm back with an exciting story to share.

When I first started developing this web application, I utilized the Golang Gin framework and Vue 3. I have no significant complaints about Gin, but Gofiber is faster, and I prefer to minimize expenses for long-term sustainability. Building a successful startup is a daunting task, and every cent counts.

Regarding the frontend, I've been a Vue user for several years and naturally gravitated towards Vue 3. I appreciate its improved composition API, which makes it even more user-friendly. However, as the project grew, I faced challenges integrating external JS libraries due to the scarcity of Vue ports. I was reluctant to create my own ports due to time constraints, and using my own functions felt inadequate.

I had previously heard about Svelte and had even worked with it on a project during the Sapper era. I decided to revisit Svelte and installed SvelteKit and Svelte 3. Surprisingly, I grasped it quickly. Defining props is unnecessary; instead, you simply

export let someprop
Enter fullscreen mode Exit fullscreen mode

. Similarly, declaring computed properties is straightforward, using

$:
Enter fullscreen mode Exit fullscreen mode

Everything is truly intuitive and effortless.

The most significant advantage of Svelte is its ease of incorporating pure JS libraries.
While you can use

onMount
Enter fullscreen mode Exit fullscreen mode

for this purpose, my preferred method is leveraging actions and easily integrating them using

use:someaction
Enter fullscreen mode Exit fullscreen mode

.

For the next post, I'll delve into the business side of my journey, including my current efforts to secure investors and partners. I'm also eager to learn about effective methods, websites, and forums for attracting sponsors and partners.

Please share any insights or recommendations you may have regarding finding investors and partners. I appreciate your support and look forward to your feedback.

Image by pch.vector on Freepik

Top comments (9)

Collapse
 
webjose profile image
José Pablo Ramírez Vargas

Svelte 5 is in next status. Why, on this day, did you use Svelte v3? Why not Svelte v4?

Collapse
 
tinkerbaj profile image
tinkerbaj

Currently, it is Svelte 4, but at the time I started working on the project, it was Svelte 3.

Collapse
 
webjose profile image
José Pablo Ramírez Vargas

I see. Makes sense. This is a recap of something that happened a year or so ago. Got it.

Collapse
 
jenesius profile image
Архипцев Евгений

I think this is a common production problem 🤕🤕

Collapse
 
tinkerbaj profile image
tinkerbaj

About use of pure js libraries or the scalability?

Thread Thread
 
jenesius profile image
Архипцев Евгений

About old version of main library. We had Vue1 on the prod project when people already started talking about Vue3.

Thread Thread
 
tinkerbaj profile image
tinkerbaj

This is what is beautiful about svelte. In most cases internal things its easy to rework but if you depends on some library and you need to wait to someone upgrade it. This can be so bad. With svelte you can use pure libraries that is probably the biggest benefit

Thread Thread
 
jenesius profile image
Архипцев Евгений

I look forward to the continuation of this article!

Thread Thread
 
tinkerbaj profile image
tinkerbaj

I will now be more consistent, probably typing every 3-4 days.