Re:Hyperdom: A react like framework with (gasp) 2 way data b...
by jgforbes on Thursday August 30, 2018 @07:24AM
(#17875759)
Personally not a huge fan of two-way binding. As someone who has come from the C#/XAML world (where two-way binding can be abused), I found the pure-functional component strategy for React and similar frameworks to be far, far simpler.
Now, I do agree that it can lead to a bit of boilerplate, but this extra verbosity helps keep a simple mental model for us to reason about. Two-way binding can get very complex when you can have weird cyclical state changes.
Re:Hyperdom: A react like framework with (gasp) 2 way data b...
by dereke on Thursday August 30, 2018 @08:00AM
(#17875938)
I think weird cyclical state changes are a feature of your chosen framework. For instance I worked on an angular (1.x) project where we would routinely have these issues - in fact they were well documented. We ported the project to hyperdom and I've never seen an issue with state since.
Now, I do agree that it can lead to a bit of boilerplate, but this extra verbosity helps keep a simple mental model for us to reason about. Two-way binding can get very complex when you can have weird cyclical state changes.