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!