ReactJS is a JavaScript library for building user interfaces.
Components and props
Components are the basic building block of ReactJS. Conceptually, they are like JavaScript functions. They accept arbitrary inputs props and return React elements describing what should appear on the screen.
The simplest way to define a component is to write a JavaScript function:
This function is a valid React component because it accepts a single props (which stands for properties) object argument with data and returns a React element. Such components are called function components because they are literally JavaScript functions.
Another way to define a component is to use an ES6 class: