What is React? Why to use React? When to use React?

What is React?

const Greeting = () => <h1>Hello World!</h1>;
const Greeting = () => <h1>Hi, I’m Functional component!</h1>;
class Greeting extends React.Component {
render(){
return <h1>Hi, I’m a Class component!</h1>;
}
}
const myelement = <h1>JSX is very good!</h1>;

ReactDOM.render(myelement, document.getElementById('root'));
const myelement = React.createElement('h1', {}, 'I do not use JSX!');

ReactDOM.render(myelement, document.getElementById('root'));
const myelement = <h1>React is {5 + 5} times better with JSX</h1>;

Why to use React?

When to use React?

Full Stack Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store