5 Reasons Why I Love React Native

March 13, 2018 0 Comments

5 Reasons Why I Love React Native

 

 

React Native is very popular these days, and thousands of apps are already built using React Native. Big names like Facebook, AirBnB, Uber, and many other companies have embraced React Native and are building their latest apps using React Native.

I have been writing apps in React Native for our startup for almost two years now, and here are some of the things I love about it.

I started writing my first React Native app, with zero prior experience in mobile application development. I knew Javascript, and that was all I needed to get started. Even React was a new concept to me. Web developers can leverage their knowledge in Javascript to write React Native apps.

Once you learn the React lifecycle components and the basics of ES6 (React Native uses ES6 standards for Javascript), you are all set to get started with your first React Native application.

Facebook’s official documentation is very helpful and provides a good insight into React Native components and APIs.

You are going to learn on the fly as you code. Isn’t that the best way to learn anyways?

This is one of my most favorite aspects of developing React Native Apps. Coming from an enterprise Java background this was huge for me.

Imagine retaining the state of your application and watch it reload as you make your changes. If you are working on a feature few screens away from the main screen, it will require you to navigate through multiple clicks, every time you make changes to the code.

With Hot Reloading, you don’t have to waste any time navigating through those screens to make sure your code worked. The application’s state is maintained, and you get to watch it all reload right in front of your eyes in less than few seconds. The idea is to keep the app running and watch any changes made during runtime take effect, without a complete relaunch of the app.

Cmd+D and “Enable Hot Reloading” does the trick on the emulator.

This saves so much of the developer time. Check out this video to see how it works in action.

Unlike other frameworks like Cordova that are mostly just a Webview, React Native is used to build truly native apps. Webviews do not provide the natural user experience that comes with React Native.

With React Native the underlying widgets are all native components, hence giving the user a seamless experience. This truly makes a huge difference.

It is really impressive since you are coding in Javascript, and rendering components that are native to the platform. This is one of the reasons that apps built using React Native have a superior user experience in comparison to frameworks that use web-views.

A simple example here shows the user interface for a date picker widget on both Android and iOS. Both the date pickers are native widgets.

Android Date Picker— Underlying Native Widget
iOS Date Picker — Underlying Native Widget

These are some aspects of React Native that makes the developer’s life much easier and we don’t need to reinvent the wheel here. There is absolutely no additional UI coding required to make these native components render cross platforms.

The previous example brings me to the next most important reason why I have enjoyed working with React Native — It’s cross-platform capabilities.

You don’t need to know Objective-C, Swift or Java. With Javascript and JSX you build your app which works very well cross-platforms. From my experience, almost 95% of the code is shared between iOS and Android, with minor tweaks to polish the end product on both platforms. Isn’t that just great? You don’t have to have multiple teams and codebases to support the same app cross-platforms.

Instead, you have one team and one codebase that works on both the iOS and Android versions of the app. This is a huge win for small companies and a cost and time saver.

Although I have not tried it yet, React Native works well for Windows too. The more the merrier obviously.

With React Native build Android, iOS and Windows Apps all in Javascript.

Over the last couple years, React Native has gained so much popularity, that there are plenty of developers contributing to make React Native better everyday.

The React Native GitHub repo is open source and has thousands of contributors who are very active.

There is a new discussion forum for React Native that you can be a part of as well.

Stack Overflow is another place which has plenty of resources and questions answered on React Native.

The community is huge and growing. Many problems have already been solved, and you are most likely not going to re-invent the wheel during your development experience.

Overall, I think React Native has come to stay and definitely has a brilliant future in developing cross-platform, native apps, which are UI centric. I hope you build your first React Native app, very soon.


Tag cloud