Created
November 8, 2018 11:38
-
-
Save cbrannen9a/dfad050cdf8706f89ad2bba6e8a870ff to your computer and use it in GitHub Desktop.
Partial Checkout.js with handleChange function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
handleChange = (name, area) => event => { | |
const value = event.target.value; | |
this.setState({ | |
[area]: { | |
...this.state[area], | |
[name]: value | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment