How to use react-native-gifted-chat - 10 common examples

To help you get started, weโ€™ve selected a few react-native-gifted-chat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FaridSafi / react-native-gifted-chat / Example / App.js View on Github external
this.setState((previousState) => {
      return {
        ...previousState,
        messages: GiftedChat.append(previousState.messages, messages),
      };
    });
    // this.onReceive(); // for demo purpose
github cameronmoreau / react-native-dating-app / src / screens / Chat.js View on Github external
this.setState((previousState) => ({
      messages: GiftedChat.append(previousState.messages, messages),
    }));
  }
github FaridSafi / react-native-gifted-chat / Example / App.js View on Github external
this.setState((previousState) => {
      return {
        ...previousState,
        messages: GiftedChat.append(previousState.messages, {
          _id: Math.round(Math.random() * 1000000),
          text: 'Hodor',
          createdAt: new Date(),
          user: {
            _id: 2,
            name: 'Bot',
            avatar: 'https://facebook.github.io/react/img/logo_og.png',
          },
        }),
      };
    });
  }
github calebnance / expo-slack / src / screens / ChatScreen.js View on Github external
this.setState(previousState => ({
      messages: GiftedChat.append(previousState.messages, formattedMessage)
    }));
  }
github wendelfreitas / animavita / packages / mobile / src / pages / Chat / index.js View on Github external
function onSend(typedMessage) {
    setMessages(GiftedChat.append(messages, typedMessage));
    sendMessage({
      variables: {
        conversation: conversation._id,
        user: user._id,
        content: typedMessage[0].text,
      },
    });
  }
github Bit-Nation / BITNATION-Pangea-mobile / src / screens / ChatScreen / index.js View on Github external
this.setState(previousState => ({
        messages: GiftedChat.append(previousState.messages, messages),
      }));
github atyenoria / react-native-webrtc-janus-gateway / src / chat.js View on Github external
this.setState((previousState) => ({
        messages: GiftedChat.append(previousState.messages, messages),
      }));
    }
github bunkerchat / bunker / mobile / App.js View on Github external
this.setState((previousState) => {
			return {
				messages: GiftedChat.append(previousState.messages, messages),
			}
		})
github just4fun / stuhome / src / containers / PmList / PmList.js View on Github external
this.setState(previousState => {
      return {
        messages: GiftedChat.append(previousState.messages, Object.assign({}, messages[0], { isNew: true }))
      };
    });
github vinnyoodles / react-native-socket-io-example / client / index.js View on Github external
this.setState((previousState) => {
      return {
        messages: GiftedChat.append(previousState.messages, messages),
      };
    });
  }

react-native-gifted-chat

The most complete chat UI for React Native

MIT
Latest version published 3 months ago

Package Health Score

87 / 100
Full package analysis