React Native, when you want an app RN!

Need an app RN? just use RN!

A guy: Im coding an app RN

Another guy: Wow! RN?

A guy: Yes! RN!

Another guy: When is it gonna be finished?

A guy: RN!

Another guy: Wow! RN!

Okay maybe enough of the RN puns RN (Whoops!). In all seriousness, React Native really is awesome and can help you make apps pretty fast.

So, what the heck is React Native?! React Native is an open-source framework for building native mobile apps using just Javascript & reuses a lot of existing concepts from React, it was released by Facebook in 2015 and has been maintained ever since. A lot of the mobile apps you may have used such as Instagram, Facebook (Duh), Skype, Discord, & Uber Eats, to name a few, use React Native!

“Okay I guess thats pretty cool, but whats so cool about coding mobile apps in Javascript?” you may ask. Well first, a lot of us are already familiar with Javascript when we learnt about web development and HTML, secondly React Native is very similar to React that uses JSX. JSX is an additional syntax in Javascript that resembles XML, this makes it so easy and familiar to code components since its just like coding HTML! Below is an example of making a button component in React Native:

If you look at the return value of the Button constant, the syntax is so similar to HTML which makes the process of coding a component so simple. If you pay attention to the styling variables at the bottom, it’s also really similar to CSS. These factors contribute a lot in making the learning curve of React Native far easier than other mobile app frameworks whether hybrid too or not.

Of course the advantages of using React features isn’t only applied in JSX components, but you can also use all the useState, useEffect, and other hooks that React provides. Additionally you can also use Redux to make your whole app’s state management robust and ready for the big tech world. 😜

Now, a React Native app isn’t always purely coded in Javascript, it depends whether you’re running it on a managed workflow on Expo, or using the React Native CLI. If you’re really new to mobile development using the managed workflow on Expo is highly recommended as you won’t need to lay a single finger on native code, it even takes care of the requirement to have the native development tools such as Android Studio & Xcode, this in turn saves a whole LOT of space and also saves your computer’s resources as building an app is taken care of on your phone or on the Expo cloud.

You might be asking: “Wow, Expo sure does a lot to help me develop my app. Why use React Native CLI then?”. Well a lot of the fun stuff I previously mentioned about Expo clearly also comes with its own set of drawbacks, mainly that Expo isn’t really 100% compatible with React Native packages and the assisted builds by Expo actually can have a larger file size compared to when using the React Native CLI.

Well that’s all I can talk about React Native for now, having been coding and learning React Native for the past 6 months and more to go, I can say that React Native definitely is an awesome framework to learn from scratch. Even though I’ve talked quite a lot about React Native in this article, it offers a whole lot more useful features that you can learn than meets the eye!

A CS guy dipping the different puddles of the software engineering realm. Currently interning at a Fintech company. Find me at your local coffeeshop 😜