Last active
May 31, 2019 09:06
-
-
Save anchetaWern/51da9512dd7a8353aa540bc78b9e2e2c to your computer and use it in GitHub Desktop.
React Native Stream Group Chat Tutorial: Get message
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
// src/screens/Chat.js | |
getMessage = ({ id, user, text, created_at }) => { | |
const data = { | |
_id: id, | |
text: text, | |
createdAt: new Date(created_at), | |
user: { | |
_id: user.id, | |
name: user.name, | |
avatar: user.image | |
} | |
} | |
return { | |
message: data | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment