As technology grows fast you need to develop your skills faster. There are different technical languages which are available in the market and every language has its own pros and cons.

It’s always been procrastination for me to start a different language. I am an Android Developer and was developing apps for more than 3 years and had never touched any other language. I wanted to be a pro in Android application development.

A few months back, I got an opportunity to start with React. I started discussing the same with my seniors and friends.

Should I try another language too or stick with Android Development?

After a few discussions, I convinced myself to give a try to React.

I started going through the syntax of Javascript and moved to React development in a week. It was very easy to learn React Development for me because I was an Android Developer. I was able to relate quite a lot of things of React with Android.

Before I start to tell you about my experience, I want you to give it a try first.

Let’s have a look, how it’s related to Android.

Props (React) works as Extras in Intent (Android)

We can pass any information from one component to another using ‘props’.

Render (React) works similar to LayoutInflator (Android)

Render function in React is used to inflate any view on the screen. We can pass any HTML element or Component to render.

Architecture (React) has almost the same layers (Android)

The architecture of any software completely depends on the use-case of the product. But, we can adopt the same architecture of Android in React.

Presentation Layer: It includes Components and Containers

Domain Layer: It includes Actions and Reducers

Data Layer: It includes Services

App.css (React) is like styles.xml (Android)

We can write different attributes under one class name and provide that class name to any element and it will inherit all the properties of that class.

JSX (React) behaves like JetPack Compose (Android)

JSX allows us to write HTML in React. All we need to provide .jsx extension to our file and it will start accepting HTML elements.

MainCompnent (React) can behave like Activity (Android) and SubComponents (React) can behave like Fragments (Android)

We can also use components as Activities or Fragments. We can render a component inside a component and provides all the features as we provide in Android. Because of this feature, it is easy to achieve bottom navigation, tabbed activity or navigation drawer feature in React.

Package.json (React) is very similar to build.gradle (Android)

We can provide all the dependencies in package.json. We can also separate dev dependencies from prod dependencies.

External Dependencies

Ant-D/Material UI (React) behave similarly to Material Design (Android)

We can use any of the designing libraries in React. My personal favorite is Ant-D

Redux (React) works as EventBus (Android)

Redux is very helpful for state management of the whole app. It stores the state in an object tree inside a single store.

Axios (React) works as Retrofit (Android)

Axios is an Http client that we can use to call REST APIs. It is a promise-based client so we can take advantage of async or await.

React Over Android

Fast reload

This is the best feature in any web-based language. React only render changes so there is no need to reload the whole page again. Also, the reloading time of an application is very less as compared to Android.

No more ANR or crash popups

There is no need to worry about it in React as a bug will not crash your application.

Easier state management

React has a very good mechanism to manage states. We can create states for every component which helps to handle UI according to the state of the component ex. Fetching Data, Loading, Error, Success, etc.

Conclusion

I adapt many things from React which I am trying to do in Android. Different languages help you to think in different ways. Every language has its own beauty. IMHO, we should try different languages to learn and adapt more. It’s okay to be a monolingual programmer but it limits your potential and your usefulness.