2022-02-22
2990
#firebase#react native
Emmanuel Etukudo
64007
Feb 22, 2022 â‹… 10 min read

Build a chat app with react-native-gifted-chat

Emmanuel Etukudo I am a full-stack developer with more than five years of experience, with a preference for JavaScript, Node.js, Go, React, Redux, and MongoDB.

Recent posts:

TypeScript logo over a pink and white background.

Drizzle vs. Prisma: Which ORM is best for your project?

Compare Prisma and Drizzle ORMs to learn their differences, strengths, and weaknesses for data access and migrations.

Temitope Oyedele
Nov 21, 2024 â‹… 10 min read
Practical Implementation Of The Rule Of Least Power For Developers

Practical implementation of the Rule of Least Power for developers

It’s easy for devs to default to JavaScript to fix every problem. Let’s use the RoLP to find simpler alternatives with HTML and CSS.

Timonwa Akintokun
Nov 21, 2024 â‹… 8 min read
Rust logo over black marble background.

Handling memory leaks in Rust

Learn how to manage memory leaks in Rust, avoid unsafe behavior, and use tools like weak references to ensure efficient programs.

Ukeje Goodness
Nov 20, 2024 â‹… 4 min read
Robot pretending to be a person.

Using curl-impersonate in Node.js to avoid blocks

Bypass anti-bot measures in Node.js with curl-impersonate. Learn how it mimics browsers to overcome bot detection for web scraping.

Antonello Zanini
Nov 20, 2024 â‹… 13 min read
View all posts

6 Replies to "Build a chat app with react-native-gifted-chat"

  1. Just want to point out, at the time when this article was published (August 27, 2021) this is already outdated. It uses the syntax for Firestore 8.x and not 9.x which is modular.

  2. I would like to change to one on one chat app, but I adding the toUser field under chat, it with error Function addDoc() called with invalid data. Unsupported field value: undefined, could you advise. Thanks.

    Add the toUser: ‘aaaa’ on snapshot.docs.map
    const { _id, createdAt, text, user, toUser } = messages[0]
    addDoc(collection(db, ‘chats’), { _id, createdAt, text, user, toUser });

  3. Thank you for the blog post, messaging is tricky and we need more docs on implementing chat in React and RN. For further reading on this topic, I suggest those interested check our open source Ethora engine which includes full chat / messaging support. We have implemented the UI using GiftedChat and we use ejabberd XMPP server for the chat backend.

    You can take a peek into our code if it helps with implementing your project: https://github.com/dappros/ethora or just clone the repo, change splash screen and build your app on top of our engine if you like how things are arranged there.

    Any feedback is welcome!

Leave a Reply