Last active
July 6, 2017 17:53
-
-
Save pachun/baddaf5dc583c67120808280d629fd57 to your computer and use it in GitHub Desktop.
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
| const ForgotPasswordView = (props) => { | |
| var showMessage = false | |
| const handleSubmit = (form) => { | |
| const { dispatch } = props | |
| dispatch(resetPassword(form.email)) | |
| // this does not trigger a re-rendering because it's not state. | |
| showMessage = true | |
| } | |
| console.log("showMessage: ", showMessage) | |
| return ( | |
| <Panel> | |
| <ForgotPasswordForm onSubmit={handleSubmit}/> | |
| // this should show up after the onSubmit button is clicked. | |
| { showMessage && <span>hi there</span>} | |
| </Panel> | |
| ) | |
| } | |
| export default connect()(ForgotPasswordView) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment