React JS


React JS

React is a javascript library for building interactive user interfaces. React was created by Jordan Walke, a software engineer at Facebook. It is maintained by Facebook and a community of individual or companies. React can be used as a base in the development of single-page or mobile applications. however, React is only concerned with rendering data to the DOM, and so creating React applications usually requires the use of additional libraries for state management and routing. It is one of the best front end development framework. React makes it painless interactive UI design. Declarative views make your code more predictable and easier to debug. React code is made of entities called components. Components can be rendered to a particular element in the DOM using the React DOM library. When rendering a component, one can pass in values that are known as props.

The two primary ways of declaring components in React is via functional components and class-based components.

  • Functional components are declared with a function that then returns some JSX.
  • Class-based components are declared using ES6 classes. They are also known as "stateful" components because their state can hold values throughout the component and can be passed to child components through props.

Another notable feature is the use of a virtual Document Object Model, or virtual DOM. React creates an in-memory data-structure cache, computes the resulting differences, and then updates the browser's displayed DOM efficiently. This allows the programmer to write code as if the entire page is rendered on each change, while the React libraries only render subcomponents that change.