After watching the YouTube video Rich Harris - Rethinking reactivity, these are three ideas that stood out to me:
Truly reactive code is just better.
Too many times throughout my development career, I have coded lines upon lines of code without thinking of the load being put on the machine. Rich Harris truly puts value into Svelte by comparing it to other frameworks like React, Vue, and Angular and the way that they run their code. With every framework I have worked with up to this point, the entirety of a function or multiple functions is called when one thing is changed. That is not truly reactive. By only updating the affected variables in the code, Svelte truly is reactive.
Svelte, like the modern era, is attempting to be minimalistic.
Svelte is intuitive.
Two examples from Rich Harris’ presentation stand out to me: scoped styles, and missing
alt tags. Having used React quite a bit, having global styles can often be burdensome. I always seem to end up with lots of classes and even more lines of code. Svelte gives you the ability to scope your CSS. I am aware that React has this feature as well, however, it never seemed like the way React wanted you to work with CSS. Scoped CSS is Svelte’s primary way of doing CSS and it makes sense.
Rich Harris explains that majority of us developers will never understand the difficulties of accessing the internet or an app with a disability. The example he gave of having an image without and
alt tag really showed how Svelte is trying to help with accessibility. When issues such as a missing
alt tag occur, you will get a message in your terminal telling you that you should have an
alt tag on the image on line x:x. He mentions that it will still compile without it, but it will not respect you for it.