Skip to main content

Developing an app with react native and firebase - firestore - Part 1

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
–John F. Woods

Let's face it, we are two years into work from home, quarantined from the outside and this makes me wonder that how lucky I am as an engineer to be able to have so many domains open for me to work on, with which I could eventually make money, help others. In other words, it gives me the power to bring a change. I just can't think of a problem where technology cannot help. As soon as I find a problem in minutes my mind starts to work on how it can be solved technically. I think this development is what our college provides us with, to open our technical aspects.
Today, I will be talking about react-native and firestore, making app development a little painless and fast.
If we are looking to solve a simple everyday problem and want an app to do it for us, an app that is not very complex - react native is the way to go.
So, the question here is Where do we begin?
To answer that I would suggest the following -
  1. Learn React and redux
  2. Learn about distinctions between react and react native-like div in react is called view in native.
  3. Learn expo ( great library to have while developing)
  4. Start coding
This should take you approximately a month or so to complete if you are at it for more than an hour each day but eventually depends on how fast you grasp things maybe even less than a month too. After you are done with everything listed above, it is time to develop a simple app.

Setup

  1. Download node.js
  2. Open your terminal from either your editor( I use VS code) or from Start -> Search for CMD
  3. Use cd command to browse to the folder where you want the app to be developed and type -> npm install --global expo-cli
  4. Now as we have expo installed, our second command is to initialize the app, type -> expo init my-problem-solving-app
  5. Once that is done, type -> expo start
  6. As soon as expo start happens and everything works fine, you will see a browser window opening with a QR code to the bottom left of your screen
  7. Download expo GO app on your mobile phone and this app provides an option to scan the QR code present in your browser
  8. Make sure your laptop and your phone are on the same network, I prefer using a mobile hotspot and connecting my laptop to it.
  9. After the scan, You will see the app is opening on your mobile device. Pretty cool right?
Now whenever you make a change and save, the same will be reflected on your mobile device. Do let me know if you find any errors or maybe browse through stack overflow. In the next blog, I will explain how to connect this app we just initialized with firestore with a simple login form.

Comments

Popular posts from this blog

My Quarantine "Efforts"

A true relationship is two imperfect people refusing to give up on each other. – Them This blog is on relationships and of course a bit of coding, otherwise it would be stupid to put it here anyways. My girlfriend and I have been having some issues lately regarding the term "Efforts". Now when I put it in front of any of my friends, They have the same reply "Efforts" and when asked what efforts are? … Nothing. I get a supposedly deep answer - Efforts come from within. What does that even mean?. So I tried some stuff to get a response from her. Well for some context we came in relationship on 28 february,2020 and guess when the lockdown started in India. Don't guess, you may as well google it. It was not even a month before the lockdown began and we flew back home. She lives more than 1500km from my state. But you know sometime you just meet the right person and you just know. We knew we had to fight this as we had so much left to say to each ot...

What The Hell Is gRPC?

Time is the longest distance between two places. ― Tennessee Williams  If you are a software engineer and you work on websites or any other software which is in high demand by your consumer, but you see that some parts of your application say the products page gets higher demand than any other services you provide at some point of time or let's say you want to loosely couple your application for your application to be developed more easily and flexibly.  These are a few use cases, there are many more. We are seeing a trend in the industry getting more aligned toward following microservices patterns while building the application. The When, Why, Where, and How parts of microservices can be easily found on the internet.  Here I want to talk more about some new technologies which have become an integral part when we talk about microservices. So this blog would be more fruitful for people who know the  When, Why, Where, and How  parts. Today, I will talk a...