Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
React Native Stream Group Chat Tutorial: Get message
// 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
You can’t perform that action at this time.