Convert Figma logo to code with AI

FaridSafi logoreact-native-gifted-chat

💬 The most complete chat UI for React Native

13,500
3,554
13,500
196

Top Related Projects

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.

A complete native navigation solution for React Native

React Native's Animated library reimplemented

Cross-Platform React Native UI Toolkit

React Native Calendar Components 🗓️ 📆

Quick Overview

The react-native-gifted-chat library is a highly customizable and feature-rich chat UI component for React Native applications. It provides a comprehensive set of tools and features to build modern and engaging chat experiences within your mobile apps.

Pros

  • Extensive Customization: The library offers a wide range of customization options, allowing developers to tailor the chat UI to match the branding and design of their application.
  • Robust Feature Set: react-native-gifted-chat includes features such as message bubbles, user avatars, timestamp display, message status indicators, and more, making it easy to build a feature-rich chat experience.
  • Cross-Platform Compatibility: The library is designed to work seamlessly across both iOS and Android platforms, ensuring a consistent user experience across different mobile devices.
  • Active Community and Maintenance: The project has an active community of contributors and maintainers, ensuring regular updates, bug fixes, and support for the latest React Native versions.

Cons

  • Steep Learning Curve: The library's extensive customization options and feature set can make it challenging for beginners to get started, especially if they are new to React Native development.
  • Performance Concerns: Depending on the complexity of the chat implementation and the number of messages, the library may experience performance issues, especially on older or lower-end devices.
  • Limited Real-Time Functionality: While the library provides a solid foundation for building chat features, it does not include built-in real-time functionality, such as WebSockets or Firebase integration, which may require additional setup and configuration.
  • Dependency on External Libraries: The library relies on several external dependencies, which can increase the overall project size and complexity, and may require additional maintenance and updates.

Code Examples

Here are a few code examples demonstrating the usage of the react-native-gifted-chat library:

  1. Rendering the Chat UI:
import React, { useState } from 'react';
import { GiftedChat } from 'react-native-gifted-chat';

const ChatScreen = () => {
  const [messages, setMessages] = useState([]);

  const onSend = (newMessages = []) => {
    setMessages(GiftedChat.append(messages, newMessages));
  };

  return (
    <GiftedChat
      messages={messages}
      onSend={onSend}
      user={{
        _id: 1,
      }}
    />
  );
};

export default ChatScreen;

This example sets up a basic chat screen using the GiftedChat component, handling the state of the messages and the onSend callback to add new messages to the conversation.

  1. Customizing the Message Bubble:
import React from 'react';
import { GiftedChat, Bubble } from 'react-native-gifted-chat';

const ChatScreen = () => {
  // ...

  return (
    <GiftedChat
      messages={messages}
      onSend={onSend}
      user={{
        _id: 1,
      }}
      renderBubble={(props) => (
        <Bubble
          {...props}
          wrapperStyle={{
            right: {
              backgroundColor: '#6646ee',
            },
          }}
        />
      )}
    />
  );
};

export default ChatScreen;

This example demonstrates how to customize the message bubble by using the renderBubble prop and the Bubble component provided by the library.

  1. Handling User Avatars:
import React from 'react';
import { GiftedChat, Avatar } from 'react-native-gifted-chat';

const ChatScreen = () => {
  // ...

  return (
    <GiftedChat
      messages={messages}
      onSend={onSend}
      user={{
        _id: 1,
        name: 'John Doe',
        avatar: 'https://example.com/avatar.png',
      }}
      renderAvatar={(props) => (
        <Avatar
          {...props}
          imageStyle={{
            left: {
              borderWidth: 2,
              borderColor: '#6646ee',
            },

Competitor Comparisons

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.

Pros of react-native-firebase

  • Comprehensive Firebase integration: Offers a wide range of Firebase services, including authentication, real-time database, cloud functions, and more
  • Active development and community support: Regular updates and a large user base ensure ongoing improvements and bug fixes
  • Native implementation: Provides better performance and deeper integration with Firebase services

Cons of react-native-firebase

  • Steeper learning curve: Requires understanding of Firebase ecosystem and configuration
  • Larger bundle size: Includes multiple Firebase modules, which may increase app size
  • More complex setup: Requires additional configuration steps compared to simpler chat solutions

Code Comparison

react-native-firebase (Authentication):

import auth from '@react-native-firebase/auth';

auth()
  .signInWithEmailAndPassword(email, password)
  .then(() => console.log('User signed in!'));

react-native-gifted-chat (Sending a message):

import { GiftedChat } from 'react-native-gifted-chat';

<GiftedChat
  messages={this.state.messages}
  onSend={messages => this.onSend(messages)}
  user={{
    _id: 1,
  }}
/>

While react-native-firebase provides a comprehensive Firebase integration solution, react-native-gifted-chat focuses specifically on creating a chat interface. The choice between the two depends on project requirements and the desired level of Firebase integration.

A complete native navigation solution for React Native

Pros of react-native-navigation

  • Offers a more native navigation experience with smooth transitions and animations
  • Provides better performance for complex navigation structures
  • Supports advanced features like deep linking and custom transitions

Cons of react-native-navigation

  • Steeper learning curve compared to simpler navigation solutions
  • Requires additional setup and configuration
  • May have compatibility issues with certain third-party libraries

Code Comparison

react-native-navigation:

Navigation.setRoot({
  root: {
    stack: {
      children: [
        { component: { name: 'Home' } }
      ]
    }
  }
});

react-native-gifted-chat:

<GiftedChat
  messages={this.state.messages}
  onSend={messages => this.onSend(messages)}
  user={{
    _id: 1,
  }}
/>

While react-native-navigation focuses on app navigation, react-native-gifted-chat is specifically designed for chat interfaces. The code snippets demonstrate their different purposes and usage patterns.

react-native-navigation offers more control over the app's navigation structure and transitions, making it suitable for complex apps with multiple screens and custom navigation requirements. On the other hand, react-native-gifted-chat provides a ready-to-use chat interface with built-in features like message rendering and input handling.

Choosing between these libraries depends on your project's specific needs. If you require advanced navigation capabilities, react-native-navigation is a strong choice. For implementing a chat feature, react-native-gifted-chat offers a more specialized solution.

React Native's Animated library reimplemented

Pros of react-native-reanimated

  • Offers more advanced and performant animations
  • Provides a declarative API for complex gesture handling
  • Allows for smoother interactions and transitions

Cons of react-native-reanimated

  • Steeper learning curve compared to Gifted Chat
  • Requires more setup and configuration
  • Not specifically designed for chat interfaces

Code Comparison

react-native-reanimated:

import Animated, { useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';

const animatedStyles = useAnimatedStyle(() => {
  return {
    transform: [{ translateX: withSpring(offset.value * 255) }],
  };
});

react-native-gifted-chat:

import { GiftedChat } from 'react-native-gifted-chat';

<GiftedChat
  messages={messages}
  onSend={newMessages => onSend(newMessages)}
  user={{
    _id: 1,
  }}
/>

react-native-reanimated is a powerful animation library for React Native, offering advanced capabilities for creating smooth, performant animations and gestures. It provides a more low-level API, giving developers greater control over animations and interactions.

In contrast, react-native-gifted-chat is a specialized library for building chat interfaces in React Native. It offers a higher-level, more opinionated API specifically designed for chat functionality, making it easier to implement chat features quickly.

While react-native-reanimated excels in creating custom animations and interactions, react-native-gifted-chat is more suitable for rapidly developing chat interfaces with less customization required.

Cross-Platform React Native UI Toolkit

Pros of react-native-elements

  • Broader set of UI components for general app development
  • More customizable and flexible for various app styles
  • Larger community and more frequent updates

Cons of react-native-elements

  • Not specialized for chat interfaces
  • May require more setup and customization for chat functionality
  • Potentially larger bundle size due to diverse component set

Code Comparison

react-native-elements:

import { Button, Input } from 'react-native-elements';

<Button title="Send" onPress={handleSend} />
<Input placeholder="Type a message" onChangeText={setText} />

react-native-gifted-chat:

import { GiftedChat } from 'react-native-gifted-chat';

<GiftedChat
  messages={messages}
  onSend={newMessages => handleSend(newMessages)}
  user={{ _id: 1 }}
/>

react-native-elements provides general-purpose UI components that can be used to build a chat interface, while react-native-gifted-chat offers a pre-built, specialized chat component with built-in functionality. The choice between them depends on the specific needs of your project and the level of customization required for the chat interface.

React Native Calendar Components 🗓️ 📆

Pros of react-native-calendars

  • More focused on calendar functionality, offering a wide range of calendar types and customization options
  • Better documentation with clear examples and API references
  • Larger community and more frequent updates

Cons of react-native-calendars

  • Limited to calendar-specific features, lacking chat or messaging capabilities
  • May require additional libraries for more complex date-related operations
  • Steeper learning curve for advanced customizations

Code Comparison

react-native-calendars:

import {Calendar} from 'react-native-calendars';

<Calendar
  markedDates={{
    '2023-05-16': {selected: true, marked: true, selectedColor: 'blue'},
    '2023-05-17': {marked: true},
    '2023-05-18': {marked: true, dotColor: 'red', activeOpacity: 0}
  }}
/>

react-native-gifted-chat:

import {GiftedChat} from 'react-native-gifted-chat';

<GiftedChat
  messages={this.state.messages}
  onSend={messages => this.onSend(messages)}
  user={{
    _id: 1,
  }}
/>

The code comparison shows that react-native-calendars focuses on calendar-specific props and customization, while react-native-gifted-chat is tailored for chat functionality. react-native-calendars offers more granular control over date-related features, whereas react-native-gifted-chat provides a more comprehensive chat solution out of the box.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

   react-native-gifted-chat

💬 Gifted Chat

The most complete chat UI for React Native & Web

npm downloads npm version

 build

Demo Web 🖥

Snack GiftedChat playground

Sponsor



Coding Bootcamp in Paris co-founded by Farid Safi

Click to learn more



Scalable chat API/Server written in Go

API Tour | React Native Gifted tutorial



A complete app engine featuring GiftedChat

Check out our GitHub

Features

  • 🎉 react-native-webable (since 0.10.0) web configuration
  • Write with TypeScript (since 0.8.0)
  • Fully customizable components
  • Composer actions (to attach photos, etc.)
  • Load earlier messages
  • Copy messages to clipboard
  • Touchable links using react-native-parsed-text
  • Avatar as user's initials
  • Localized dates
  • Multi-line TextInput
  • InputToolbar avoiding keyboard
  • Redux support
  • System message
  • Quick Reply messages (bot)
  • Typing indicator

Getting started

Installation

Install dependencies

Yarn:

yarn add react-native-gifted-chat react-native-reanimated react-native-safe-area-context react-native-get-random-values

Npm:

npm install --save react-native-gifted-chat react-native-reanimated react-native-safe-area-context react-native-get-random-values

Expo

npx expo install react-native-gifted-chat react-native-reanimated react-native-safe-area-context react-native-get-random-values

Non-expo users

npx pod-install

Setup react-native-safe-area-context

Follow guide: react-native-safe-area-context

Setup react-native-reanimated

Follow guide: react-native-reanimated

react-native-video and expo-av

  • Both dependencies are removed since 0.11.0.
  • You still be able to provide a video but you need to provide renderMessageVideo prop.

Testing

TEST_ID is exported as constants that can be used in your testing library of choice

Gifted Chat uses onLayout to determine the height of the chat container. To trigger onLayout during your tests, you can run the following bits of code.

const WIDTH = 200; // or any number
const HEIGHT = 2000; // or any number

const loadingWrapper = getByTestId(TEST_ID.LOADING_WRAPPER)
fireEvent(loadingWrapper, 'layout', {
  nativeEvent: {
    layout: {
      width: WIDTH,
      height: HEIGHT,
    },
  },
})

You have a question?

  1. Please check this readme and may find a response
  2. Please ask on StackOverflow first: https://stackoverflow.com/questions/tagged/react-native-gifted-chat
  3. Find response on existing issues
  4. Try to keep issues for issues

Example

import React, { useState, useCallback, useEffect } from 'react'
import { GiftedChat } from 'react-native-gifted-chat'

export function Example() {
  const [messages, setMessages] = useState([])

  useEffect(() => {
    setMessages([
      {
        _id: 1,
        text: 'Hello developer',
        createdAt: new Date(),
        user: {
          _id: 2,
          name: 'React Native',
          avatar: 'https://placeimg.com/140/140/any',
        },
      },
    ])
  }, [])

  const onSend = useCallback((messages = []) => {
    setMessages(previousMessages =>
      GiftedChat.append(previousMessages, messages),
    )
  }, [])

  return (
    <GiftedChat
      messages={messages}
      onSend={messages => onSend(messages)}
      user={{
        _id: 1,
      }}
    />
  )
}

Advanced example

See App.tsx for a working demo!

"Slack" example

See the files in example/example-slack-message for an example of how to override the default UI to make something that looks more like Slack -- with usernames displayed and all messages on the left.

Message object

e.g. Chat Message

export interface IMessage {
  _id: string | number
  text: string
  createdAt: Date | number
  user: User
  image?: string
  video?: string
  audio?: string
  system?: boolean
  sent?: boolean
  received?: boolean
  pending?: boolean
  quickReplies?: QuickReplies
}
{
  _id: 1,
  text: 'My message',
  createdAt: new Date(Date.UTC(2016, 5, 11, 17, 20, 0)),
  user: {
    _id: 2,
    name: 'React Native',
    avatar: 'https://facebook.github.io/react/img/logo_og.png',
  },
  image: 'https://facebook.github.io/react/img/logo_og.png',
  // You can also add a video prop:
  video: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4',
  // Mark the message as sent, using one tick
  sent: true,
  // Mark the message as received, using two tick
  received: true,
  // Mark the message as pending with a clock loader
  pending: true,
  // Any additional custom parameters are passed through
}

e.g. System Message

{
  _id: 1,
  text: 'This is a system message',
  createdAt: new Date(Date.UTC(2016, 5, 11, 17, 20, 0)),
  system: true,
  // Any additional custom parameters are passed through
}

e.g. Chat Message with Quick Reply options

See PR #1211

interface Reply {
  title: string
  value: string
  messageId?: number | string
}

interface QuickReplies {
  type: 'radio' | 'checkbox'
  values: Reply[]
  keepIt?: boolean
}
  {
    _id: 1,
    text: 'This is a quick reply. Do you love Gifted Chat? (radio) KEEP IT',
    createdAt: new Date(),
    quickReplies: {
      type: 'radio', // or 'checkbox',
      keepIt: true,
      values: [
        {
          title: '😋 Yes',
          value: 'yes',
        },
        {
          title: '📷 Yes, let me show you with a picture!',
          value: 'yes_picture',
        },
        {
          title: '😞 Nope. What?',
          value: 'no',
        },
      ],
    },
    user: {
      _id: 2,
      name: 'React Native',
    },
  },
  {
    _id: 2,
    text: 'This is a quick reply. Do you love Gifted Chat? (checkbox)',
    createdAt: new Date(),
    quickReplies: {
      type: 'checkbox', // or 'radio',
      values: [
        {
          title: 'Yes',
          value: 'yes',
        },
        {
          title: 'Yes, let me show you with a picture!',
          value: 'yes_picture',
        },
        {
          title: 'Nope. What?',
          value: 'no',
        },
      ],
    },
    user: {
      _id: 2,
      name: 'React Native',
    },
  }

Props

  • messageContainerRef (FlatList ref) - Ref to the flatlist
  • textInputRef (TextInput ref) - Ref to the text input
  • messages (Array) - Messages to display
  • isTyping (Bool) - Typing Indicator state; default false. If you userenderFooter it will override this.
  • text (String) - Input text; default is undefined, but if specified, it will override GiftedChat's internal state (e.g. for redux; see notes below)
  • placeholder (String) - Placeholder when text is empty; default is 'Type a message...'
  • messageIdGenerator (Function) - Generate an id for new messages. Defaults to UUID v4, generated by uuid
  • user (Object) - User sending the messages: { _id, name, avatar }
  • onSend (Function) - Callback when sending a message
  • alwaysShowSend (Bool) - Always show send button in input text composer; default false, show only when text input is not empty
  • locale (String) - Locale to localize the dates. You need first to import the locale you need (ie. require('dayjs/locale/de') or import 'dayjs/locale/fr')
  • timeFormat (String) - Format to use for rendering times; default is 'LT' (see Day.js Format)
  • dateFormat (String) - Format to use for rendering dates; default is 'll' (see Day.js Format)
  • loadEarlier (Bool) - Enables the "load earlier messages" button, required for infiniteScroll
  • onLoadEarlier (Function) - Callback when loading earlier messages
  • isLoadingEarlier (Bool) - Display an ActivityIndicator when loading earlier messages
  • renderLoading (Function) - Render a loading view when initializing
  • renderLoadEarlier (Function) - Custom "Load earlier messages" button
  • renderAvatar (Function) - Custom message avatar; set to null to not render any avatar for the message
  • showUserAvatar (Bool) - Whether to render an avatar for the current user; default is false, only show avatars for other users
  • showAvatarForEveryMessage (Bool) - When false, avatars will only be displayed when a consecutive message is from the same user on the same day; default is false
  • onPressAvatar (Function(user)) - Callback when a message avatar is tapped
  • onLongPressAvatar (Function(user)) - Callback when a message avatar is long-pressed
  • renderAvatarOnTop (Bool) - Render the message avatar at the top of consecutive messages, rather than the bottom; default is false
  • renderBubble (Function) - Custom message bubble
  • renderTicks (Function(message)) - Custom ticks indicator to display message status
  • renderSystemMessage (Function) - Custom system message
  • onPress (Function(context, message)) - Callback when a message bubble is pressed
  • onLongPress (Function(context, message)) - Callback when a message bubble is long-pressed (see example using showActionSheetWithOptions())
  • inverted (Bool) - Reverses display order of messages; default is true
  • renderUsernameOnMessage (Bool) - Indicate whether to show the user's username inside the message bubble; default is false
  • renderUsername (Function) - Custom Username container
  • renderMessage (Function) - Custom message container
  • renderMessageText (Function) - Custom message text
  • renderMessageImage (Function) - Custom message image
  • renderMessageVideo (Function) - Custom message video
  • imageProps (Object) - Extra props to be passed to the <Image> component created by the default renderMessageImage
  • videoProps (Object) - Extra props to be passed to the video component created by the required renderMessageVideo
  • lightboxProps (Object) - Extra props to be passed to the MessageImage's Lightbox
  • isCustomViewBottom (Bool) - Determine whether renderCustomView is displayed before or after the text, image and video views; default is false
  • renderCustomView (Function) - Custom view inside the bubble
  • renderDay (Function) - Custom day above a message
  • renderTime (Function) - Custom time inside a message
  • renderFooter (Function) - Custom footer component on the ListView, e.g. 'User is typing...'; see App.tsx for an example. Overrides default typing indicator that triggers when isTyping is true.
  • renderChatEmpty (Function) - Custom component to render in the ListView when messages are empty
  • renderChatFooter (Function) - Custom component to render below the MessageContainer (separate from the ListView)
  • renderInputToolbar (Function) - Custom message composer container
  • renderComposer (Function) - Custom text input message composer
  • renderActions (Function) - Custom action button on the left of the message composer
  • renderSend (Function) - Custom send button; you can pass children to the original Send component quite easily, for example, to use a custom icon (example)
  • renderAccessory (Function) - Custom second line of actions below the message composer
  • onPressActionButton (Function) - Callback when the Action button is pressed (if set, the default actionSheet will not be used)
  • bottomOffset (Integer) - Distance of the chat from the bottom of the screen (e.g. useful if you display a tab bar)
  • minInputToolbarHeight (Integer) - Minimum height of the input toolbar; default is 44
  • listViewProps (Object) - Extra props to be passed to the messages <ListView>; some props can't be overridden, see the code in MessageContainer.render() for details
  • textInputProps (Object) - Extra props to be passed to the <TextInput>
  • textInputStyle (Object) - Custom style to be passed to the <TextInput>
  • multiline (Bool) - Indicates whether to allow the <TextInput> to be multiple lines or not; default true.
  • keyboardShouldPersistTaps (Enum) - Determines whether the keyboard should stay visible after a tap; see <ScrollView> docs
  • onInputTextChanged (Function) - Callback when the input text changes
  • maxInputLength (Integer) - Max message composer TextInput length
  • parsePatterns (Function) - Custom parse patterns for react-native-parsed-text used to linking message content (like URLs and phone numbers), e.g.:
 <GiftedChat
   parsePatterns={(linkStyle) => [
     { type: 'phone', style: linkStyle, onPress: this.onPressPhoneNumber },
     { pattern: /#(\w+)/, style: { ...linkStyle, styles.hashtag }, onPress: this.onPressHashtag },
   ]}
 />
  • extraData (Object) - Extra props for re-rendering FlatList on demand. This will be useful for rendering footer etc.
  • minComposerHeight (Object) - Custom min-height of the composer.
  • maxComposerHeight (Object) - Custom max height of the composer.
  • scrollToBottom (Bool) - Enables the scroll to bottom Component (Default is false)
  • scrollToBottomComponent (Function) - Custom Scroll To Bottom Component container
  • scrollToBottomOffset (Integer) - Custom Height Offset upon which to begin showing Scroll To Bottom Component (Default is 200)
  • scrollToBottomStyle (Object) - Custom style for Bottom Component container
  • alignTop (Boolean) Controls whether or not the message bubbles appear at the top of the chat (Default is false - bubbles align to bottom)
  • onQuickReply (Function) - Callback when sending a quick reply (to backend server)
  • renderQuickReplies (Function) - Custom all quick reply view
  • quickReplyStyle (StyleProp) - Custom quick reply view style
  • renderQuickReplySend (Function) - Custom quick reply send view
  • shouldUpdateMessage (Function) - Lets the message component know when to update outside of normal cases.
  • infiniteScroll (Bool) - infinite scroll up when reach the top of messages container, automatically call onLoadEarlier function if exist (not yet supported for the web). You need to add loadEarlier prop too.

Notes for Redux

The messages prop should work out-of-the-box with Redux. In most cases, this is all you need.

If you decide to specify a text prop, GiftedChat will no longer manage its own internal text state and will defer entirely to your prop. This is great for using a tool like Redux, but there's one extra step you'll need to take: simply implement onInputTextChanged to receive typing events and reset events (e.g. to clear the text onSend):

<GiftedChat
  text={customText}
  onInputTextChanged={text => this.setCustomText(text)}
  /* ... */
/>

Notes for Android

If you are using Create React Native App / Expo, no Android specific installation steps are required -- you can skip this section. Otherwise, we recommend modifying your project configuration as follows.

  • Make sure you have android:windowSoftInputMode="adjustResize" in your AndroidManifest.xml:

    <activity
      android:name=".MainActivity"
      android:label="@string/app_name"
      android:windowSoftInputMode="adjustResize"
      android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
    
  • For Expo, there are at least 2 solutions to fix it:

    • Append KeyboardAvoidingView after GiftedChat. This should only be done for Android, as KeyboardAvoidingView may conflict with the iOS keyboard avoidance already built into GiftedChat, e.g.:
<View style={{ flex: 1 }}>
   <GiftedChat />
   {
      Platform.OS === 'android' && <KeyboardAvoidingView behavior="padding" />
   }
</View>

If you use React Navigation, additional handling may be required to account for navigation headers and tabs. KeyboardAvoidingView's keyboardVerticalOffset property can be set to the height of the navigation header and tabBarOptions.keyboardHidesTabBar can be set to keep the tab bar from being shown when the keyboard is up. Due to a bug with calculating height on Android phones with notches, KeyboardAvoidingView is recommended over other solutions that involve calculating the height of the window.

Notes for local development

Native

  1. Install yarn global add expo-cli
  2. Install dependenciesyarn install
  3. expo start

react-native-web

With expo

  1. Install yarn global add expo-cli
  2. Install dependenciesyarn install
  3. expo start -w

Upgrade snack version

With create-react-app

  1. yarn add -D react-app-rewired
  2. touch config-overrides.js
module.exports = function override(config, env) {
  config.module.rules.push({
    test: /\.js$/,
    exclude: /node_modules[/\\](?!react-native-gifted-chat|react-native-lightbox|react-native-parsed-text)/,
    use: {
      loader: 'babel-loader',
      options: {
        babelrc: false,
        configFile: false,
        presets: [
          ['@babel/preset-env', { useBuiltIns: 'usage' }],
          '@babel/preset-react',
        ],
        plugins: ['@babel/plugin-proposal-class-properties'],
      },
    },
  })

  return config
}

You will find an example and a web demo here: xcarpentier/gifted-chat-web-demo

Another example with Gatsby : xcarpentier/clean-archi-boilerplate

Questions

License

Author

Feel free to ask me questions on Twitter @FaridSafi! or @xcapetir!

Contributors

Hire an expert!

Looking for a ReactNative freelance expert with more than 14 years of experience? Contact Xavier from his website!

NPM DownloadsLast 30 Days