Last active
January 4, 2016 06:49
-
-
Save tyler-dot-earth/4e08a0ee1418f353ef5b to your computer and use it in GitHub Desktop.
Form component task.js
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
// In the parent component ... | |
render() { | |
let myOnSuccessFunction = function({word, color}) { | |
alert('word: ', word) | |
alert('color: ', color) | |
} | |
return ( | |
<ColorWordForm | |
onSave={myOnSuccessFunction} | |
/> | |
) | |
} | |
// Your task: write the ColorWordForm component. | |
// - It should use the onSave function when the form is "saved" (submitted). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment