ReactJS vs React Native — Differences

React and React Native have similarities and differences. They are popular JavaScript frameworks that were developed by the same company. They both HEAVILY use class and functional components.

What is ReactJS?

It’s a JavaScript frontend library used to build the user interface on web applications. It is an open-source Javascript library developed by Facebook. It makes web applications much faster and more dynamic.

What is React Native?

It’s a Javascript framework for iOS and Android development. This was also created by Facebook, about two years after ReactJS was created. It makes it easier and more cost-effective to create mobile applications. Instead of having to create two applications with different frameworks and teams for Android development and iOS development, React Native allows you to use one application and one framework and have the application work on both mobile devices.

Differences

Starting with the obvious difference, React Native is made for building mobile applications for iOS and Android while ReactJS is for building web applications.

React JS uses HTML in its components since it has a DOM. React Native does NOT use HTML since there is no DOM available on mobile. React Native has equivalent or similar components from the native API that are used in place of HTML tags. For example: instead of using a <p> tag for text, we use a <Text> tag.

In ReactJS, we can use CSS stylesheets. In React Native, there are no CSS stylesheets that we can import and use. With React Native, we use the StyleSheet Object from the native API that has similar (but NOT the same) syntax as CSS to style our mobile applications.

This is not a conclusive list of all the differences between ReactJS and React Native. Play around with both to build the same app and see what differences you can find!

Happy Coding!

Photo by Karsten Winegeart on Unsplash

--

--

--

Software Engineering Student at Flatiron NYC. Learning day by day 💻

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Compose notes

A React.js Roadmap for Vue.js Developers

The things you should know about React JS

Getting started with Angular Material (Angular 6+)

Typescript: Javascript’s special sauce

How to Format Dates in JavaScript with Moment.JS

Android life cycle aware components

Using Mocha for Test-Driven Development in building API with Node / Express

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ajak Cyer

Ajak Cyer

Software Engineering Student at Flatiron NYC. Learning day by day 💻

More from Medium

A Cue On The Best Websites That Think In React.JS

Top 5 React JS Framework Every Developer Should Know in 2022

My First React Native Experience

React vs React Native