Created
June 23, 2019 00:57
-
-
Save greaveselliott/76d81c534cc9093745c85c4d155018ff 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
const onFormSubmit = event => { | |
event.preventDefault(); | |
const listItemValue = input.current.value; | |
if (listItemValue !== "") { | |
createNewListItem({ | |
dispatch, | |
payload: { listItemValue } | |
}); | |
input.current.value = ""; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment