Skip to content

ShortDoc What is React.JS?

ArmandDu edited this page Sep 23, 2018 · 3 revisions

What is React.JS?

React is a small JavaScript Library made to build User Interfaces (UI). Use it with ReactDOM and you can create robust Web User Interfaces.

Core Concepts

  • React is a Library for your UI
  • It has no opinion about the rest of your stack
  • It has a declarative approach
  • It is Component based

Usage

To use React.Js, it is recommended to use ES6+ language and to configure your transpiler to understand JSX syntax.

The easiest way to start a new React project is to use create-react-app

npx create-react-app my-app
cd my-app
rm -r src && mkdir src #start fresh
<EDITOR> . 
//src/index.js
import React, { Component } from "react";

class App extends Component {
    render() {
        return (
            <div>
                I am a React Application
            </div>
        )
    }
}

ReactDOM.render(<App />, document.getElementById('root'));
Clone this wiki locally