Short thread about function declaration labeled with `$:` in
@sveltejs#SvelteSnippets
Usually, u want to use `reactive statements` every time u need to calc smth based on another. But sometimes for this calc, u need a template's context, eg. index/item during array iteration👇
Today was a great day 🥳. Thanks to our attendees for being active.
I was happy that I was able to convince few people to go for @sveltejs
Me: "And this is why you must and should start using @sveltejs"
#DevC#sveltejs#javascript
The first dotJS 2019 lightning talk to be published is the one from Bertrand Chevrier @kramp. He explains how @sveltejs changed his mind on frameworks.
dotconferences.com/2019/12/b…
Yesterday I was a guest at Mail.ru Group - one of the biggest Russian IT company. Gym & basketball playground right inside of office is very impressive. But the main thing is that they already use @sveltejs, are you?
In practice, I feel that the @sveltejs docs haven't enough info about the power of `reactive statements` labeled with `$:` Let's broaden the horizons: #SvelteSnippets
ALT <script>
let foo, bar, baz;
$: quux = foo + bar;
$: console.log(quux);
$: {
// block expression
}
$: if (quux > 10) {
// actually any ->
} else {
// js expression
}
$: for (let i = 0; i < baz; i++) {
// any js expression
}
// function declaration too
$: grunt = arg => quux / arg * baz;
$: ...
With the caveat that the #StateOfJS survey is probably wildly unrepresentative of developers at large, and with an acknowledgment that @sveltejs still has a long way to go, I'm pretty encouraged with these results. Proud of our small but mighty community 2019.stateofjs.com/front-end…
Pretty shook by this @sveltejs usage statistic. Cool to see larger companies getting on board!
This is from the State of JS survey for 2019: 2019.stateofjs.com
This was a development delight using @sveltejs It is always a good project when you get to write a function like this... see if you can find why that's there :) :) :)
Hey @sveltejs, my team at Apple is looking for a consultant to work on a Svelte App in Cupertino, CA.
would really appreciate an RT from you, my DMs are open
The first @sveltejs hello world just landed on @scrimba - Time to get experimenting with the fastest growing component framework for the web.
scrimba.com/c/cJpbLEcJ