My React Native Journey
18 Sep 2023
In 2022, I set out to challenge myself. I had no prior React/React Native experience and I hadn't used Javascript in a while. ES6 sounded like an ev car model. But, what I did know was that I had to jump in and get an app developed for PPFAS - as I was consulting with them and we had just lost our mobile developer and finding someone new was taking a while. I had the coding chops, inclination and a desire to learn. I wanted to deep dive into a project that would be challenging and would be something actual users would use. This financial app enabled customers to view and manage their investments.
This was it. I jumped in not knowing what I was getting myself into. The desire to learn and to get something amazing out was far more than the fears/ doubts that circled my mind. In April 2023, we launched the new app on iOS and Android :)
Here are my notes on my learnings and thoughts on this experience (in any order):
React Native vs. Flutter
This was one of the articles I read last year which tilted by decision on using React Native instead of Flutter. I had dived into Flutter in 2020 and didn't find it intuitive. React on the other hand was easy and fun to learn. I just leaned towards React + Expo and decided this was the way to go.
Flutter is better than React Native**…in all the ways that don’t matter.
Mosh's Course
I spent a few months deep diving through Mosh's React Native course. I have referred to them while creating the app almost every week. Thank you Mosh! Money well spent.
Back to Basics
While going through the course I often would branch out and would spend time brushing up on ES6 (e.g. map, reduce, filter etc.), JSON parsing and other fundamentals. It was good to get back to basics. Getting to learn React Navigation, Context Formik took a while but with playing around with code these things started to make sense. React Native is an universe on it's own. There is just so much to learn. I even spent a few days going through the official docs and scratched my head around how hooks worked. With React, one has to think in React!
Expo
Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React. Mosh's tutorial explains Expo and getting started with it. It's SDK makes native device features accessible to your project - they have already done all the heavy lifting. With Expo Application Service, you will automate the entire build and release process as well (paid service). Creating React Native apps with expo is probably the best thing that has happened. Expo sped up a lot of my developement.
Typescript
I wish I knew Typescript last year. It would have saved me time fixing bugs later on. Mosh does not touch upon Typescript in this course and I didn't have time to learn so many things including Typescript. Today, we are now going through the app and adding Typescript support.
Resources
Stackoverlow and Youtube were absolute timesavers. Every problem you have, someone has already had it and it's documented somewhere! That is the beauty of the Internet and the tech community. I don't think there was ever a scenario where I was left without a solution or a workaround to a problem.
AI
Over the last few months I am using AI (ChatGPT4) to speed up development of new features. I am currently trying cursor.so - it's a fork off VSCode with AI capabilities (freemium). I am getting a good understanding of what I should hand off to a computer and what I shuould write from scratch. Over the next few years, we'll look back and laugh at all the code we spent time on writing which was equivalent of making bricks for a building.
Fewer People
I would have slowed down a lot if I was working with someone else and trying to mentor them my way of developing while learning to build. Contrary to what people think, you don't need many developers to get an app developed faster. A few good focused developers should suffice. Here, I was alone and learning and coding at good speed.
Cheer On
I would often share screenshots of my progress on our slack channel. The cheers and thumbs-up increased my momentum. Sometimes, it's lonely working alone and an emoji is all you need.
Testing
Once I picked up speed I would only test on the iOS simulator daily and once a week fire up the Android simulator to see if everything looked ok. Most of the time it did with just some minor adjustments.
UI Component Libs
I went through various component style libraries but in the end I decided to create the components from scratch (thanks to Mosh's course). I wanted to minimize any learning curve associated with this project and focus on learning the core. I did go down a few rabbit holes with one of the style libraries only to come up empty handed. The UI librars had poor documentation and a few things just did not work - contrary to say Bootstrap for the web, these React Native UI libraries had not evolved to that level. I felt I was adding another layer of learning to my already learning layer of React Native and Javascript. It's actualy quite fun writing your own components and then reusing them everywhere.
Web vs Mobile
Coming from the web, designing for the mobile was different. I had to distill everythere to make sure I have the minimum viable UI that fits onto the small screen. Instructions, help text, error/ success messages etc. were all cut down to look good on smaller screens.
Journal
Since I was working alone, I kept an Apple note documenting everything I came across, had issues with etc while developing this app. This was my journal and even the tiniest detail would make it there. At the end of the day I would document what I am working on so that it becomes easier the next day to pick up from. Even a simple "my ssh key has expired and I need to renew them" would go into this so that the next time around I don't need to spend time looking for a solution. Now, with a small team, we maintain all our documentation on a git wiki.
My entry for April 1st, 2023 reads: ITS LIVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I hope this is helpful to anyone starting a new project and feels it's going to be an uphill battle. Just keep in mind that everything that is built is built by people like you and me and they started at the bottom of the mountain. The rest is easy as long as you are willing to learn, solve problems and you keep reminding yourself on the "why am I doing this".
Good luck!
Ask me anything @sahilparikh