10 Difference Between React.js and React Native


  • Brijpal Sharma

    February 13th, 2019 , Posted On:- Web Development

    react reactjs


So today's topic is that 10 Difference Between React Js and React Native, React.js is made up of two words where React stands for a JavaScript library and .js means JavaScript and other hands React Native is a framework for building native applications using JavaScript.

10 Difference Between React.js and React Native

React.js

Basic React.js is a modified version of JavaScript that is used to create a good user interface and React.js has developed by Facebook. React.js is responsible for developing a hierarchy of UI components that mean rendering of UI components.

10 Difference Between React.js and React Native

Code Sample

import React, { Component } from 'react';
import ReactDOM from 'react-dom';

class Clock extends React.Component {
  constructor(props) {
    super(props);
    this.state = {date: new Date()};
  }

  componentDidMount() {
    this.timerID = setInterval(
      () => this.tick(),
      1000
    );
  }

  componentWillUnmount() {
    clearInterval(this.timerID);
  }

  tick() {
    this.setState({
      date: new Date()
    });
  }

  render() {
    return (
      <div>
        <h1>Hello, world!</h1>
        <h2>It is {this.state.date.toLocaleTimeString()}.</h2>
      </div>
    );
  }
}

ReactDOM.render(
  <Clock />,
  document.getElementById('root')
);

React Native

React Native is a framework for develope a Naive Application using JavaScript. React Native make possible to develop a Native mobile application. The best thing about React Native is supporting both Android and iOS, that means apps made on Reactive Native can be run on both Android and iOS.

Code Sample

import React, { Component } from 'react';
import { Text, View } from 'react-native';

class WhyReactNativeIsSoGreat extends Component {
  render() {
    return (
      <View>
        <Text>
          Hello world.
        </Text>
        <Text>
         React Native is awesome.
        </Text>
      </View>
    );
  }
}

 

S.No React.js React Native
1. ReactJS is a JavaScript library. This is a mobile framework that compiles to native app components.
2. Supporting both front-end web and being run on a server.  React Native Allowing you to build native mobile applications for different platforms (iOS, Android, and Windows Mobile) in JavaScript.
3. For building user interfaces and web applications. For building mobile applications.
4. This is a declarative, efficient, and flexible JavaScript library for building user interfaces. With help of React Native, you build mobile apps using only JavaScript. React native allows to uses the same design as React, letting you compose a rich mobile UI from declarative components.
5. For React.js you need DOM for path rendering of HTML tags. React-Native uses AppRegistry to register your app.
6. React.js is a web application javascript library. React Native is a framework for real mobile app. 
7. You can reuse code component in React.js saving a lot of time.  React Native has Reusable UI components & modules that allow hybrid apps to render natively.
8. React usesHTML-CSS for defining interfaces and it also improve SEO fo But React native has a separate set of tags for defining the user interface for mobile.
9. Its give high-performance website and web application. It gives a high-performance mobile application.
10. Open sourced by Facebook. Open sourced by Facebook.

 

So here we complated today topic 10 Difference Between React.js and React Native.

 


About Author
  • user profile
    Brijpal Sharma

    brijpalsharma99@gmail.com, January 29th, 2018

    Hi, I am a web developer, I working on Laravel and CodeIgniter framework, I love to share knowledge and tutorials so I here...


0 Comment


You must be logged in to post a comment.


You may also be interested in...
Connect Multiple databases in the same Laravel project
SEO tool for Laravel Application
Paypal payment gateway integration in Laravel 5.7 step by step
How to Check User online or not in Laravel
How to keep filter data after the click to next button in Laravel pagination
Which is better for web development, Laravel or Flask?
Laravel 5.7 Route Tutorial Step by Step for Beginners
10 Difference Between React.js and React Native
How to Use Angular Material in Angular 7
Laravel 5.7 Passport API Authentication With Example