Legit question: What makes Svelte's 2-way binding better than its 2-way binding predecessors? Remember, part of the success of React is the rejection of 2-way binding and the bugs/confusion that came w/ it, favoring one-way data flow. The verbosity is a feature, not a bug.
Real quick! I was discussing this with @catalinmpit and thought I'd share! Same component, does the same thing. First image React the next one is Svelte. This was one of the big "aha!" moments for me coming from React. Take a look at the code in the next tweet!
Show this thread
13
13
1
160
I won't deny the verbosity can get old. I'm also not insulting Svelte in any way. I genuinely want to understand how we've gone full circle on 2-way binding, and what makes it better in Svelte than previous 2-way binding frameworks.

8:35 PM · Oct 23, 2021

6
0
0
42
Replying to @kyleshevlin
👆🏻I would also like to understand this better
1
0
0
1
here you go
Svelte also has one way data flow under the hood, but uses binding and syntax sugar to simulate LOCAL two way data flow. its not that different. data propagation with stores vs context however are very different.
1
0
0
1
Replying to @kyleshevlin
5+ years have passed. You have a whole generation of programmers who have never felt the pain that React solves and don’t understand why it exists.
3
3
2
38
👀👀👀 heh. seriously, this is half the reason why I had to go rewrite the Redux docs tutorials :) no one today knows that "Flux" was, why 1WDF with "dispatched actions" was better than Backbone models cascading events, etc.
1
0
0
9
Replying to @kyleshevlin
I have had this question for a while!! What changed? Trends? For simple applications, two way data binding creates much less verbose solutions. For complex apps, it creates a lot of confusion.
1
0
0
2
my answer last time this came up
Svelte also has one way data flow under the hood, but uses binding and syntax sugar to simulate LOCAL two way data flow. its not that different. data propagation with stores vs context however are very different.
0
0
0
1
Replying to @kyleshevlin
It’s way more manageable when it’s constrained inside just the one component, not a whole sale full separate model interacting with a whole sale full view. The correctness tradeoff is more acceptable in those circumstances.
4
0
1
20
<input ng-model="vm.my.deeply.nested.field"> <input ng-change="vm.doSomethingRandom(vm.some.other.field)"> 😱😱😱
1
0
0
5
Replying to @kyleshevlin
I asked this very same question too some time ago.. This was what @swyx had to say
Svelte also has one way data flow under the hood, but uses binding and syntax sugar to simulate LOCAL two way data flow. its not that different. data propagation with stores vs context however are very different.
1
0
0
1
yep. this needs to be on the svelte FAQ somewhere lol its such a common question by react devs
1
0
0
3