react-native-gifted-chat
Copilot instructions14k starsChanged 5 months agoMITView on GitHub
The most complete chat UI for React Native & Web. This is a TypeScript React Native component library with example applications demonstrating usage across React Native, React Native Web, and Expo platforms. Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
- Installs packages
We split this copilot-instructions.md into the rules it gives an agent
16 rules. About 0 are common, 7 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does …
- Very specific: line 19
If tests fail due to snapshot mismatches after fresh dependency install, run yarn test -u to update snapshots
- Distinctive: line 52
After making code changes, you should test basic functionality by:
- Distinctive: line 56
ALWAYS test that the TypeScript declarations in /lib are correctly generated
- Very specific: line 59
All tests are located in src/__tests__/ directory
- Very specific: line 61
Test coverage can be viewed with yarn test:coverage
- Very specific: line 88
Run yarn lint to check style
- Very specific: line 89
Run yarn build to compile TypeScript
- Very specific: line 90
Run yarn test to verify tests pass
- Distinctive: line 91
Test manually with example app if UI changes
- Distinctive: line 95
Follow existing test patterns using React Test Renderer
- Very specific: line 96
Update snapshots if needed with yarn test -u
- Very specific: line 97
Ensure all tests pass with yarn test
- Very specific: line 102
Start development server: npx expo start
- Distinctive: line 112
Always ensure your changes pass the full validation pipeline locally before pushing.
- Distinctive: line 141
Always set timeouts to at least double these times to account for system variations.
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
React Native Gifted Chat
The most complete chat UI for React Native & Web. This is a TypeScript React Native component library with example applications demonstrating usage across React Native, React Native Web, and Expo platforms.
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
Working Effectively
Bootstrap and build the repository:
yarn install-- NEVER CANCEL: takes 58 seconds. Set timeout to 120+ seconds.yarn build-- builds TypeScript library, takes 3 seconds. Set timeout to 30+ seconds.yarn lint-- lints source code, takes 3 seconds. Currently has warnings but no errors. Set timeout to 30+ seconds.yarn test-- NEVER CANCEL: runs Jest test suite, takes 9 seconds. Set timeout to 60+ seconds.
Full validation before publishing:
yarn prepublishOnly-- NEVER CANCEL: runs lint + test + build, takes 11 seconds total. Set timeout to 60+ seconds.
Known Issues:
- If tests fail due to snapshot mismatches after fresh dependency install, run
yarn test -uto update snapshots - Snapshot tests may need updates when React Native or dependency versions change
Example app development:
cd example && yarn install-- NEVER CANCEL: takes 38 seconds. Set timeout to 90+ seconds.- Install Expo CLI globally:
npm install -g @expo/clior usenpx expocommands - Native development:
cd example && npx expo start - Web development:
cd example && npx expo start --web(requires additional dependencies) - The example app starts Metro bundler on http://localhost:8081
- Expect dependency version warnings in offline/CI mode - these are normal
Type checking and development:
yarn tsc:watch-- runs TypeScript compiler in watch mode for developmentyarn typecheck-- runs TypeScript compiler to check for TS errors
Requirements and Setup
System Requirements:
- Node.js >= 18 (tested with 20.19.4)
- Yarn package manager 1.22.22+ (do NOT use npm for this project)
- TypeScript compiler (included in devDependencies)
Dependencies are already installed if yarn.lock exists
The repository includes both package-lock.json and yarn.lock but ALWAYS use yarn commands, never npm commands.
Validation
Always run full validation before completing changes:
yarn lint-- check for code style issues (warnings are acceptable, errors are not)yarn build-- verify TypeScript compilation succeedsyarn test-- NEVER CANCEL: ensure all 19 test suites and 29 tests pass. Takes 31 seconds.
Manual validation scenarios:
After making code changes, you should test basic functionality by:
- Building the library:
yarn build - Running the test suite:
yarn test - For UI changes: Start the example app with
cd example && npx expo start --web(if web dependencies are installed) ornpx expo startfor native development - ALWAYS test that the TypeScript declarations in /lib are correctly generated
Testing approach:
- All tests are located in
src/__tests__/directory - Tests use Jest with React Test Renderer
- Test coverage can be viewed with
yarn test:coverage - Snapshot tests are used extensively (27 snapshots)
Project Structure
Key directories:
/src-- main library source code (TypeScript)/lib-- compiled JavaScript output (generated byyarn build, do not edit manually)/example-- example React Native app demonstrating library usage/src/__tests__-- Jest test files/.github/workflows/main.yml-- CI/CD pipeline (tests Node 18 and 20)
Important files:
package.json-- main project configuration and scriptstsconfig.json-- TypeScript compiler configurationjest.config.cjs-- Jest test configuration.eslintrc.cjs-- ESLint linting rulesbabel.config.cjs-- Babel transformation configurationexample/package.json-- example app dependencies
Build output:
The yarn build command generates JavaScript files and TypeScript declaration files in the /lib directory. This directory should not be edited manually and is ignored by git but included in npm package.
Common Tasks
Making code changes:
- Edit source files in
/srcdirectory - Run
yarn lintto check style - Run
yarn buildto compile TypeScript - Run
yarn testto verify tests pass - Test manually with example app if UI changes
Adding or modifying tests:
- Tests are in
src/__tests__/directory - Follow existing test patterns using React Test Renderer
- Update snapshots if needed with
yarn test -u - Ensure all tests pass with
yarn test
Working with the example app:
- Example app uses Expo and demonstrates library functionality
- Install dependencies:
cd example && yarn install - Start development server:
npx expo start - For web:
npx expo start --web(requires react-native-web and @expo/metro-runtime)
CI/CD Integration
The repository uses GitHub Actions (.github/workflows/main.yml) that:
- Tests on Node.js versions 18 and 20
- Runs
yarn installandyarn build - Build typically takes 1-2 minutes on CI
Always ensure your changes pass the full validation pipeline locally before pushing.
Common Command Reference
Root directory (library development):
yarn install # Install dependencies (58 seconds)
yarn build # Build TypeScript library (3 seconds)
yarn lint # Lint source code (3 seconds)
yarn test # Run test suite (9 seconds)
yarn prepublishOnly # Full validation pipeline (11 seconds)
yarn tsc:watch # TypeScript watch modeExample directory (app development):
cd example
yarn install # Install example dependencies (38 seconds)
npx expo start # Start native development server
npx expo start --web # Start web development serverTime expectations (NEVER CANCEL these operations):
- yarn install: 58 seconds (root), 41 seconds (example)
- yarn build: 3 seconds
- yarn lint: 3 seconds
- yarn test: 9 seconds (after fresh install and snapshot updates)
- yarn prepublishOnly: 11 seconds total
Always set timeouts to at least double these times to account for system variations.
Trending
More talk lately.about the whole repository
Who's talking about FaridSafi/react-native-gifted-chat
- Pradip Debnath“React Native Chat App UI Tutorial”YouTube · Jan 29, 2021 · 78k views
- Esteban Codes“Build a React Native Chat App with Firebase Firestore and Expo”YouTube · Aug 9, 2020 · 74k views
- React with Masoud“Serverless Real Chat APP with React Native Gifted Chat and Firebase - Full App”YouTube · Feb 13, 2022 · 15k views
- React with Masoud“React Native Chat App Tutorial | Serverless Chat APP with React Native Gifted Chat | UI Part”YouTube · Nov 6, 2020 · 8.6k views
- CodeCaty“React Native Real-Time Chat App with GiftedChat and Firebase with Push Notification”YouTube · Nov 29, 2024 · 5.3k views
The biggest 5 of 99 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 99
Talked about on GitHub, Stack Overflow, YouTube and the web (99 times).
On GitHub · 50
- Nov 6, 2018What the relation to /FaridSafi/react-native-gifted-chat? — wix-incubator/react-native-gifted-chat16 reactions
- Dec 6, 2019[Android] Absolute position not working — harshq/react-native-mentions3 reactions · 1 comment
- May 23, 2026Bump uuid, react-native, react-native-gifted-chat and jest — Dustin4444/TheUndergrad2 reactions · 3 comments
- May 2, 2026Bump uuid, react-native, react-native-gifted-chat and jest — Dustin4444/TheUndergrad2 reactions · 3 comments
- Jun 27, 2019Is this library still maintained? — livechat/react-native-livechat2 reactions · 10 comments
45 more on GitHub
- Jun 27, 2023(iOS Only) The onChangeText Event for my TextInput used for a Chat Box is not working. — react/react-native1 reaction · 8 comments
- Feb 16, 2022[fix] inverted VirtualizedList supports wheel events — necolas/react-native-web1 reaction · 4 comments
- Feb 28, 2019Recommended by gifted chat repo — BlueCallApp/react-native-gifted-chat1 reaction
- Oct 9, 2026Ein Eingabefeld wie bei Claude: Text oben über die volle Breite, Werkzeugleiste darunter (Chat und Üben) — 0xKurt/LearnBuddy0 reactions · 1 comment
- Oct 5, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — Margaret-Petersen/on-demand-food-delivery-app-template0 reactions
- Oct 5, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-app — gray-mueller/home-delivery-app-using-node-js0 reactions
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — lambertf917/react-native-uber-eats-clone0 reactions · 1 comment
- Sep 28, 2026Bump react-native-gifted-chat from 2.8.1 to 3.4.0 in /enatega-multivendor-rider — Margaret-Petersen/grocery-delivery-app-for-ios0 reactions · 1 comment
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-app — Margaret-Petersen/white-label-app-food-delivery0 reactions · 1 comment
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — marthaegrimaldi/doordash-clone-app0 reactions
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-app — patriciaperez90/online-food-order-script0 reactions · 1 comment
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — lambertf917/food-ordering-app-built-using-react-native0 reactions
- Sep 28, 2026Bump react-native-gifted-chat from 2.8.1 to 3.4.0 in /enatega-multivendor-rider — gray-mueller/instacart-clone-app0 reactions · 1 comment
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — Margaret-Petersen/online-food-ordering-system-project-sql0 reactions
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — tiffanie-Healy/swag-food-delivery0 reactions
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-app — tiffanie-Healy/doordash-clone-app0 reactions
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — raymondjames090/food-delivery-app-open-source-code0 reactions · 1 comment
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-app — raymondjames090/react-native-food-app0 reactions · 1 comment
- Sep 28, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — lambertf917/online-app-for-food-delivery-using-php0 reactions · 1 comment
- Sep 21, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-app — marthaegrimaldi/fast-food-online-ordering-system0 reactions
- Sep 21, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-app — gray-mueller/online-food-order-apps-using-node-js0 reactions · 1 comment
- Sep 21, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-app — Margaret-Petersen/zomato-clone-react-js0 reactions
- Sep 21, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-app — raymondjames090/restaurant-mobile-food-ordering-and-delivery-app-using-react-native0 reactions · 1 comment
- Sep 20, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — mohamedragab24/-30 reactions
- Sep 14, 2026Bump react-native-gifted-chat from 2.8.1 to 3.4.0 in /enatega-multivendor-app — marthaegrimaldi/foodhub-clone0 reactions
- Sep 14, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — marthaegrimaldi/ubereats-clone-solution0 reactions
- Sep 8, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-app — ezrablackfish2/ezcater0 reactions
- Sep 7, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — Margaret-Petersen/zomato-clone-using-mern-stack0 reactions
- Sep 7, 2026Bump react-native-gifted-chat from 2.4.0 to 3.4.0 in /enatega-multivendor-rider — Margaret-Petersen/online-ordering-food-app-using-python0 reactions
- Sep 7, 2026Bump react-native-gifted-chat from 2.8.0 to 3.4.0 in /enatega-multivendor-app — Margaret-Petersen/restaurant-ordering-system-open-source0 reactions
- Aug 21, 2026Bump react-native-gifted-chat from 2.8.1 to 3.4.0 in /enatega-multivendor-app — SAHILCHOUDHARI2004/foodie0 reactions
- May 24, 2026Bump uuid, expo, react-native, react-native-gifted-chat, detox, jest and jsdom — sunilhp/ss0 reactions
- Apr 9, 2026Interfaz de chat nativa con Gifted Chat — ferblanco75/investment-ai0 reactions · 1 comment
- Jan 12, 2026Bump react-native-gifted-chat from 2.4.0 to 3.2.3 in /enatega-multivendor-rider — hector-jewell/python-app-for-ordering-food0 reactions
- Dec 24, 2025chore(deps): bump react-native-gifted-chat from 2.8.1 to 3.2.2 — schamil355/nokhchi-znakomstva0 reactions
- May 17, 2025[Snyk] Upgrade react-native-gifted-chat from 0.13.0 to 2.8.1 — Dustin4444/TheUndergrad0 reactions
- Jan 13, 2025Bump react-native-gifted-chat from 2.4.0 to 2.6.5 in /enatega-multivendor-app — eugensunic/matkos0 reactions
- Oct 15, 2024Dev discussion catch-all for the redesign — Hylozoic/hylo0 reactions
- Aug 30, 2024Bump node-fetch, react-native, react-native-gifted-chat and recyclerlistview in /ReactNative_JS/example — AiStockSearch/aurora-imui0 reactions
- Apr 16, 2024[Snyk] Upgrade react-native-gifted-chat from 0.4.3 to 0.16.3 — jimmyrperezpierola/restaurant-app-react-native0 reactions
- Jun 29, 2023[Snyk] Upgrade react-native-gifted-chat from 2.0.1 to 2.3.0 — GokulKir/GPT_BOT0 reactions
- Feb 6, 2023[Snyk] Upgrade react-native-gifted-chat from 0.13.0 to 0.16.3 — mfused/React-Native-ChatBot0 reactions
- Nov 4, 2022Two bugs with the new version 4.0.0 — expo/react-native-action-sheet0 reactions · 4 comments
- Oct 6, 2022Add a mocked ChatScreen using react-native-gifted-chat that includes the contact's name in the message — roots-id/roots-react-native0 reactions · 2 comments
- May 23, 2022Here issue is in headerComponet touchable-opacity or other click not working. — satya164/react-native-tab-view0 reactions · 5 comments
On Stack Overflow · 30
- Feb 13, 2020How to customize react-native-gifted-chat in React Native 0.6120 votes
- Jan 25, 2019Invariant Violation tried to get frame out of range index NaN7 votes
- Nov 25, 2021_reactNative.Keyboard.removeListener is not a function4 votes
- May 15, 2020react-native-gifted-chat Video message is not displayed -Video not not implemented by GiftedChat4 votes
- Nov 1, 2019Is there a way to fix the "Encountered two children with the same key" error on react native when sending gifted chat messages to firestore?3 votes
25 more on Stack Overflow
- Jun 29, 2019Is there a way to modify the label prop from the gifted-chat component?3 votes · 1 answer
- Apr 29, 2022Giftedchat using layoutAnimation for animating new messages2 votes
- Sep 13, 2021Custom tolbar with buttons GiftedChat2 votes
- Feb 12, 2021How can I send files ( pdf, text, jpg) through react-native-gifted-chat?2 votes
- Nov 19, 2019props.isSameUser is not a function inside the renderBubble function2 votes
- Dec 7, 2017React Native Gifted Chat - message no showing2 votes
- May 31, 2023Bottom Margin between Keyboard and TextInput Gifted Chat1 vote
- Sep 7, 2022React Native Gifted Chat Rendering Issues1 vote
- May 19, 2022react-native-gifted-chat || Typing indicator || React native expo1 vote
- Oct 20, 2021gifted-chat renderAction prop won't call a function1 vote
- Sep 7, 2021Gifted chat message hidden by input1 vote
- Jul 31, 2020React Native Gifted Chat: How to hide keyboard and text input1 vote · 2 answers
- Apr 15, 2019Error: Command failed: git rev-parse --git-dir after running npm install on main project1 vote
- Oct 28, 2018Display receiver messages in this.state.message1 vote
- Oct 28, 2018Display receiver messages in this.state.message1 vote · 2 answers
- May 2, 2018Auto growing text input with multiline in react native1 vote
- Dec 22, 2017Custom Send button and clear textInput react-native-gifted-chat1 vote
- Nov 1, 2017React Native - How to change bubble style1 vote · 2 answers
- Feb 8, 2025App crashes when sending message in react-native-gifted-chat0 votes
- May 19, 2022How to draw separater in giftedchat?0 votes · 1 answer
- Sep 18, 2021How can I attach word/pdf files to React Native gifted chat?0 votes · 1 answer
- Sep 12, 2019React Native Gifted Chat - Video message is not clickable0 votes · 2 answers
- Mar 27, 2019Load all data from local database0 votes · 1 answer
- Sep 6, 2017How can I use react-native-actionsheet alongside react-native-gifted-chat in the same view?0 votes · 1 answer
- Jul 19, 2017Map an array with attributes to array with differents attributes0 votes · 1 answer
On YouTube · 15
- Jan 29, 2021React Native Chat App UI Tutorial — Pradip Debnath78k views · 76 comments
- Aug 9, 2020Build a React Native Chat App with Firebase Firestore and Expo — Esteban Codes74k views · 92 comments
- Feb 13, 2022Serverless Real Chat APP with React Native Gifted Chat and Firebase - Full App — React with Masoud15k views · 18 comments
- Nov 6, 2020React Native Chat App Tutorial | Serverless Chat APP with React Native Gifted Chat | UI Part — React with Masoud8.6k views · 34 comments
- Nov 29, 2024React Native Real-Time Chat App with GiftedChat and Firebase with Push Notification — CodeCaty5.3k views · 17 comments
10 more on YouTube
- Nov 5, 2020React Native | COMO FAZER UM CHAT SIMPLES EM 8 MINUTOS — miguelito3.3k views · 12 comments
- Mar 8, 2021Realtime React Native Chat App - Using the Chat Component — Back4app2.6k views
- Sep 2, 2020Creating a Custom MapView Component in React Native Gifted Chat — Yajana N Rao2.6k views · 6 comments
- Apr 10, 2023Building a simple chatApp with React Native Expo #8 Implementing gifted chat — watchmecode1.3k views
- Mar 17, 2021Chat em tempo Real usando React Native e Parse - Usando o componente de Chat — Back4app1.3k views · 10 comments
- Aug 15, 2023Building a Fitness App using Firebase & Expo with Paweł Karniej | Rocket Ship 003 — Rocket Ship | React Native Podcast286 views · 1 comment
- Jul 11, 2024Cool Packages To Use in Your Next React Native Project - Part 2 #shorts — Japheth Hirpa139 views
- Dec 17, 2023PC自作から始めるスマホアプリ開発 #38 React Native基礎編 Geminiと画像も使ってチャットする — votepurchase84 views
- Dec 8, 2023PC自作から始めるスマホアプリ開発 #36 React Native基礎編 GoogleのAIとチャットする — votepurchase66 views
- Dec 18, 2023PC自作から始めるスマホアプリ開発 #39 React Native基礎編 画像のリサイズとヘッダーボタン — votepurchase57 views
On the web · 4
- Jun 1, 2022Language translation · Issue #2210 - react-native-gifted-chat — google.com
- May 5, 2021how to integrate Giphy with react-native-gifted-chat #2047 — google.com
- May 14, 2020react-native-gifted-chat Video message is not displayed ... — google.com
- Jan 14, 2020Autoscroll to a specific message · Issue #1608 — google.com
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

