DEV Community

Karan Desai
Karan Desai

Posted on

Teach me like I'm 5! Difference between ReactJs and React Native

What is the exact difference between ReactJS and React Native? When to use which? I am still not able to figure out when ReactJS to use and when React Native? Also, (it might be silly question, but as I am completely new to this, please bear with me) is ReactJs called React? or React Native is React?

Top comments (6)

Collapse
 
jkhaui profile image
Jordy Lee • Edited

"React" on its own almost always refers to the React.js library, which is used to make web apps.
React native is a separate tool based off the same core react library but is made for developing native mobile apps (hence the word "native"). In other words, react native lets you build mobile apps using the same style and concepts as React for the web.

There's also React VR which is again the same concept - a library/tool to let developers build VR apps using common React patterns

Collapse
 
kreativekaran profile image
Karan Desai

Thank you for the response :)

This means, react or reactjs is used to develop web application while react native is used to develop mobile application?

If my understanding is correct, is there any way to develop both web and mobile application using either reactjs or react native? is it possible? or if i develop mobile application using react native can I anyhow reuse/plug it's code (or something) in reactjs to develop web?

Collapse
 
dance2die profile image
Sung M. Kim

Let me introduce you to React Native for Web.

It aims to use React Native code publishable for the web.

It's written by Nicolas Gallagher, the one who wrote Twitter lite.

Thread Thread
 
kreativekaran profile image
Karan Desai

Thanks for sharing this

Thread Thread
 
dance2die profile image
Sung M. Kim

You're welcome.

Collapse
 
jkhaui profile image
Jordy Lee

Best listen to Sung's advice. I'm not sure as I haven't worked much with React Native.