Introduction to React


React is an open-source, front end, JavaScript library for building user interfaces or UI components. It is maintained by Facebook and a community of individual developers and companies. React can be used as a base in the development of single-page or mobile applications. However, React is only concerned with state management and rendering that state to the DOM, so creating React applications usually requires the use of additional libraries for routing, as well as certain client-side functionality.

How to Make React Work
React is a JavaScript library for building user interfaces, and is used to build single page applications. React allows us to create reusable UI components. To use React in production, you need NPM and Node.js installed.

index.html
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>React App</title>
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>
index.js
import React from 'react';
import ReactDOM from 'react-dom';

class Test extends React.Component {
  render( ) {
    return <h3>Hello, World!</h3>;
  }
}
ReactDOM.render( <Test />, document.getElementById( 'root' ) );

/* This example creates a component called "Test," which is rendered
   in a container called "root" in the "index.html."
*/
localhost: 3000
Hello, World!




      I went home with this French guy 'cause he said something adorable,    
      like, “I have an apartment.”    
      — Amy Schumer on low expectations