The title is no really clear but my question is pretty simple. I'm using flux pattern. I have an event handler inside a reactclass, this handler takes an input from the user. What I'm doing is taking this input and pass it to an action (then the action update stores and finally my state is updated).
handler(e) {
var newParams = this.state;
newParams.input = e.target.value;
MyActions.someAction(newParams);
}
As you can see I want to pass the current state completed with the new input to an action. The problem is that if I'm doing this way I'm modify directly the current state without passing by setState and it's not advised at all. I don't want to use setState in my handler I want to use setState on store change.
So my question is am I compelled to use something like underscore _.clone() or is it a simpler way to do this I haven't seen ?