Skip to content

Instantly share code, notes, and snippets.

@cranesandcaff
Created December 30, 2014 07:38
Show Gist options
  • Save cranesandcaff/18bf5833c4f4be446144 to your computer and use it in GitHub Desktop.
Save cranesandcaff/18bf5833c4f4be446144 to your computer and use it in GitHub Desktop.
The form example can be written this way to avoid having to register onChange on every field (within the same form):
<form onChange={this.inputHandler}>
...
<input type="text" name="blah" value={this.state.blah}/>
...
</form>
inputHandler: function(event) {
actions.propagateValue({
field: event.target.name,
value: event.target.value
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment