3 ms·
I have found that the difference between one-way and two-way to be quite profound when it comes to the complexity of bugs produced. Race conditions become an a
by Marazan 6y ago
I have found that the difference between one-way and two-way to be quite profound when it comes to the complexity of bugs produced.
Race conditions become an almost permanent fixture with two-way and the 'chains of causality' are exponentially more complex in a two-way situation.
One-way simplifies things in quite a profound way. I remeber when watching Dan Abromov's excellent Redux tutorial physically laughing and muttering "of course" as every single two-way bug I had ever worked on flashed before my eyes.
- MaxBarraclough 6y agoSwitching to one-way-binding is really just replacing upward propagation with events, right? Aren't both approaches vulnerable to data-change cycles, just by different means?
- TuringTest 6y agoMaybe the difference is that you keep control with events, i.e. you can filter, retarget, cancel or otherwise reason in general about the way they propagate? I'm no expert, but the essence of the "reactive functional programming" programming paradigm is that you have composable high level abstractions about the streams of events (e.g. marble diagrams).[1] [1] https://blog.danlew.net/2017/07/27/an-introduction-to-functional-reactive-programming/ https://blog.danlew.net/2017/07/27/an-introduction-to-functi...