Why I’m sticking with Vue in 2023
<p>I started using Vue professionally somewhere around 2018, coming from angular. It has served me well over the years, but as you know, one can get bored doing the same old thing. And I could see how<em> all</em> the other frameworks were beating vue in the framework benchmarks.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:630/1*4Un_mIMPuQ_zed2x3CDeig.png" style="height:457px; width:700px" /></p>
<p>Benchmark from around the time I was feeling that vue was falling behind.</p>
<p>One framework has been teasing me a little bit extra, this framework was Svelte. Compared to vue, a Svelte component had very little boilerplate at that time.</p>
<p>Vue (options API):</p>
<pre>
<script>
import { defineComponent } from 'vue'
export default defineComponent({
data() {
return {
count: 0,
};
},
methods: {
handleClick() {
this.count += 1;
}
},
computed: {
label() {
return this.count === 1 ? 'time' : 'times';
}
}
});
</script>
<template>
<button @click="handleClick">
Clicked {{ count }} {{ label }}
</button>
</template></pre>
<p>Svelte would look like this:</p>
<pre>
<script>
let count = 0;
function handleClick() {
count += 1;
}
$:label = count === 1 ? 'time' : 'times';
</script>
<button on:click={handleClick}>
Clicked {count} {label}
</button></pre>
<p>Over the years I flirted a little with svelte, reading the docs and playing around with toy code. Nothing serious, until last year when I got the request to build an app where I got to select my “perfect stack”. Finally, it was time, time to make a Svelte + Rust web app with real users.</p>
<p><a href="https://medium.com/@lindblomdev/why-im-sticking-with-vue-in-2023-d67bce7bc2f4">Click Here</a></p>