DEV Community

Discussion on: Why SvelteJS may be the best framework for new web devs

Collapse
 
athif23 profile image
At Indo

I think it would be better if you put the <script> tag at the top, as it would make it easier to know where the variables comes from. And also, this is good :)

Collapse
 
bholmesdev profile image
Ben Holmes

Hm, that's a fair point! Since Svelte builds everything down to a bundle it shouldn't be a performance issue to put the <script> at the top. However, I tend to read code from the markup first, then dive into the functionality if need be. Personal preference more than anything 🤷‍♀️

Collapse
 
spotsonthestove profile image
spotsonthestove • Edited

I'm doing Maximilian's Svelte course, he puts script section at the top and it does look nice. He uses npm and only for CLI to get rollup to build and to start dev webserver. Highly recommend him and his course - on Node too.

Thread Thread
 
brotherbill profile image
Brother Bill Steinberg

I've taken that course too. It covers everything. The one gripe is that when it comes to Sapper, he refactors the existing pure Svelte SPA cours project, which I can't follow. Better would be a tiny program in Svelte/Sapper.

Other than that, the course is well worth the $12 for lifetime access.
You can find it on udemy.com.