I have been working on the same ember application for over two years and two way data binding is something that has completely bit me time and time again. I’ve read the road map to ember 2.0 and I am in favour of the proposed data down and actions up approach, but I think ember could go further and embrace immutability further but that is another topic.
I’ve created this jsbin that works for single checkbox but what I am struggling with is how this would work if I had a number of text inputs. Obviously we don’t want to be passing a handler to each input like this:
<input type="password" value=password onChange={{action "handlePassWordChange"}} />
<input value=user.name onChange={{action "handleNameChange"}}/>
In react, if I am only changing state, I can do something like this:
<input onChange={(event) => this.setState({value: event.target.value})}/>
But what are people’s thoughts about to handle this in ember. What frightens me is that a hybrid approach will be proposed where 2 way databinding is used for some scenarios and not others which does not really seem like progression but I have no evidence that this is how it will work.
So I am keen to know what people’s thoughts are on this.