Created
November 30, 2018 11:02
-
-
Save blizzerand/e53e3765bc66823f79579fa1362f24e8 to your computer and use it in GitHub Desktop.
This file contains 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
/* FormContainer.jsx */ | |
handleInput(e) { | |
let value = e.target.value; | |
let name = e.target.name; | |
this.setState( prevState => { | |
return { | |
newUser : { | |
...prevState.newUser, [name]: value | |
} | |
} | |
}, () => console.log(this.state.newUser) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment