Created
July 4, 2021 17:09
-
-
Save gabrielEloy/160c2de0d46e89cebdf0d7ee69a194a9 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 handleSubmitMessage = (e) => { | |
e.preventDefault(); | |
const Message = Parse.Object.extend("Message"); | |
const newMessage = new Message(); | |
newMessage.save({ | |
content: inputMessage, | |
senderName: Parse.User.current().get('username'), | |
senderId: Parse.User.current().id, | |
}); | |
setInputMessage(""); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment