Created
January 4, 2019 02:40
-
-
Save CodingItWrong/4c9b6fcbf112dfa8ef8ccd33ff8ab55e 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
| export default class NewMessageForm extends Component { | |
| state = { inputText: '' } | |
| handleChangeText = (text) => { | |
| this.setState({ inputText: text }); | |
| } | |
| + handleSend = () => { | |
| + this.setState({ inputText: '' }); | |
| + } | |
| + | |
| render() { | |
| ... | |
| <Button | |
| title="Send" | |
| testID="sendButton" | |
| + onPress={this.handleSend} | |
| /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment