Skip to content

Instantly share code, notes, and snippets.

@anchetaWern
Last active May 31, 2019 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anchetaWern/51da9512dd7a8353aa540bc78b9e2e2c to your computer and use it in GitHub Desktop.
Save anchetaWern/51da9512dd7a8353aa540bc78b9e2e2c to your computer and use it in GitHub Desktop.
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