2019-05-21
2387
#react#svelte
Ovie Okeh
2089
May 21, 2019 ⋅ 8 min read

Truly reactive programming with Svelte 3.0

Ovie Okeh Programming enthusiast, lover of all things that go beep.

Recent posts:

Understanding The Css Revert Layer Keyword, Part Of Css Cascade Layers

Understanding the CSS revert-layer keyword

In this article, we’ll explore CSS cascade layers — and, specifically, the revert-layer keyword — to help you refine your styling strategy.

Chimezie Innocent
Apr 24, 2024 ⋅ 6 min read
Exploring Nushell, A Rust Powered, Cross Platform Shell

Exploring Nushell, a Rust-powered, cross-platform shell

Nushell is a modern, performant, extensible shell built with Rust. Explore its pros, cons, and how to install and get started with it.

Oduah Chigozie
Apr 23, 2024 ⋅ 6 min read
Exploring Zed, A Newly Open Source Code Editor Written In Rust

Exploring Zed, an open source code editor written in Rust

The Zed code editor sets itself apart with its lightning-fast performance and cutting-edge collaborative features.

Nefe Emadamerho-Atori
Apr 22, 2024 ⋅ 7 min read
Implementing Infinite Scroll In Next Js With Server Actions

Implementing infinite scroll in Next.js with Server Actions

Infinite scrolling in Next.js no longer requires external libraries — Server Actions let us fetch initial data directly on the server.

Rahul Chhodde
Apr 19, 2024 ⋅ 10 min read
View all posts

5 Replies to "Truly reactive programming with Svelte 3.0"

  1. Mistake in this line of the vanilla.js code?
    bar = foo + 10 // now bar becomes 25
    But thanks for an excellent article, especially with regard to summarising React’s shortcomings. Looking forward to seeing what Svelte can do over the next few years

  2. Thank you! Nice Article. Understood the point about using topology much better. Good addition to the presentation of Rich Harris. You state the following:

    “Wait, what? A compiler? Yes — a compiler. It’s such a bloody good idea that I don’t know why it wasn’t so obvious until now, and I’ll tell you why I think it’s so cool.”

    Exactly what I was thinking reading about Svelte. Relative new to the javascript world and surprised by the number of frameworks, tools etc. Very very complex, certainly for an old man having a C background. Of course, I love compilers! I love small footprints and software with good performance.

    Have fun with the computer and javascript.

  3. Thank you!
    But like the first commentor said, there is something wrong with your example and that point is the one that shows how Svelte is reactive:

    let foo = 10;
    $: bar = foo + 10; // bar is now 20
    console.log(bar); // 20 <==
    foo = 15;
    console.log(bar); // 20 <== bar is STILL 20

    Because this doesn't work, it's hard to see how they achieve reactiveness.

    Thanks

Leave a Reply