Sentry Answers>React>

What is the difference between React Native and React?

What is the difference between React Native and React?

James W.

The ProblemJump To Solution

You want to create interactive UIs using React, but where do you begin?

Both ReactJS and React Native can be used for creating UIs, but you need to know what the differences are, and which one is best for you.

The Solution


ReactJS is a Javascript library that is used to build user interfaces. ReactJS is used to create logical and reusable parts of a UI using functions called “components”.

Components are Javascript functions that return parts of a UI in HTML.

Click to Copy
function Heading() { return <h>Hello World!</h> }

ReactJS uses JSX, which is a special syntax extension for Javascript that allows HTML markup to be written in Javascript code.

ReactJS has a massive open-source community, meaning there are many supporting libraries for you to use.

React Native

React Native is a Javascript library that is used to build UIs for native apps.

React Native lets you write Javascript and ReactJS for the Web, Android, iOS, Windows, TV apps, and more, all from a single codebase.

React Native is similar to ReactJS in that it allows you to create reusable components. It differs from ReactJS because it doesn’t use HTML as the building blocks for the UI. Instead, it uses native components that are found on the platforms you are building for.

With React Native you can tap into the features of a platform like push notifications and the camera on mobile devices.

So with React Native you can build an app that can run on multiple platforms without having to write code for each platform. It can be used to create a complete app, or it can be used to add onto an existing native application.

In Summary

ReactJS allows you to build UIs for the web using reusable components. React Native lets you build UIs for a number of platforms from the same codebase.

So if you are creating exclusively for the web or are looking to learn about creating UIs then ReactJS is your choice. If what you are building needs to be accessible across a number of different platforms then React Native is for you.

  • Syntax.fmReact Server Components
  • Sentry BlogFixing memoization-breaking re-renders in React
  • logo
    Listen to the Syntax Podcast

    Tasty treats for web developers brought to you by Sentry. Get tips and tricks from Wes Bos and Scott Tolinski.


Loved by over 4 million developers and more than 90,000 organizations worldwide, Sentry provides code-level observability to many of the world’s best-known companies like Disney, Peloton, Cloudflare, Eventbrite, Slack, Supercell, and Rockstar Games. Each month we process billions of exceptions from the most popular products on the internet.

© 2024 • Sentry is a registered Trademark
of Functional Software, Inc.