DEV Community

Discussion on: Let’s build a recipe app using Vue 3 + Vite

Collapse
 
yawnxyz profile image
Jan Z

wow this is an amazing tutorial. Thank you so much for putting it together! There are a couple of typos but otherwise everything works like a charm!!

Is it generally a good idea to prefer using setup() or to develop with the old model and use setup() whenever you need it?

Collapse
 
n0n3br profile image
Rogério Luiz Aques de Amorim

For simple components the options api still seems to me very suitable. I think the composition api is more suitable for bigger and more complex components where you wantto keep all the related logic near each other.

Collapse
 
yawnxyz profile image
Jan Z

Got it, thanks! I've found that converting even simple but reused components to composition / wrapped with the watcher makes things a lot simpler to scale up in the future... I've been using a lot of Svelte recently and Vue 3's latest direction really feels like Svelte's "writable" stores to me

And it's funny I've never heard of the term "Options API" until I started reading more into Vue 3, though I've built a bunch of projects with Vue 2 already...

Thread Thread
 
n0n3br profile image
Rogério Luiz Aques de Amorim

I love svelte too. Have you seen the rfc about script setup syntactic sugar ? It makes vue seems more sveltish then ever.

github.com/vuejs/rfcs/pull/182

Thread Thread
 
yawnxyz profile image
Jan Z

wow yeah, that definitely feels very Svelteish! I'm excited for this direction Vue is going and I can't wait to see what the next Nuxt will bring.

I just took your Vue 3 SWR post concepts and implemented it for my Sapper project really successfully! I'm still not so sure about deploying Sapper projects in production seeing how so much is still in flux, but Svelte/Sapper to me is like a lighter version of Vue/Nuxt, and especially so with where Vue's going