Create a Chatting app using React Native

Abdul Baasith
3 min readAug 11, 2021

--

Introduction

React Native is a great way to develop both web and mobile applications very quickly, while sharing a lot of code when targeting multiple platforms. With a mature ecosystem of libraries and tooling, using React Native is not only fast but also reliable. Trusted by organizations like Facebook, Shopify React Native is a stable framework for building both iOS and Android apps.

What is Expo?

The Expo framework builds on top of React Native to allow developers to build universal React applications in minutes. With Expo, you can develop, build, deploy and quickly iterate on iOS, Android and web apps from the same JavaScript code.

What is Firebase?

Firebase is a Back-end offering by Google. It provides developers a wide array of tools and services to develop quality apps without having to manage servers. Firebase provides key features like authentication, a real-time database, and hosting.

Lets start😋

First of all lets install expo

npm install --global expo-cli
expo init my-project

Next lets create the project chose a blank java script project

expo init chatting-app
cd chatting-app

Github link is available at the end of the blog

Now the Project is set up now lets set the firebase

now set up sign in methods

Adding Firebase credentials to the app

Click on the web icon “</>”

Copy the config for setting up firebase dependencies

Now lets install the react native navigation click

npm install @react-navigation/nativeexpo install react-native-screens react-native-safe-area-context

Next install the react native and firebase dependencies

expo install firebase

🧐🧐now lets see how it done in the code🧐🧐

First of all now lets configure the firebase

firebase.js

Lets go for the screens

LoginScreen.js

RegisterScreen.js

HomeScreen.js

AddChat.js

ChatScreen.js

ListItems.js

App.js

Done that's it for the coding part If you run the application and try to login with the test user credentials you created earlier

Now lets run the application

expo start -c

click run on android emulator or any of the above as per your desired phone

so inside now you can chat

Congratulation now we successfully implemented secure user authentication for your Expo React Native chat app, using Firebase😀 😃

if you have any questions please do let me know in the comments.😀 😃

for future classification i have given my github repository link

https://github.com/baasithshiyam/chatting-app

❤️❤️❤️❤️❤️❤️❤️Thanks for reading❤️❤️❤️❤️❤️❤️❤️❤️

--

--

Abdul Baasith
Abdul Baasith

Written by Abdul Baasith

Hi there i'm Abdul Baasith, A passionate Software Engineer . If your tool is a hammer then every problem look like a nail

Responses (1)