What is React?

Definition:

Extremely popular, declarative, component-based, state-driven JavaScript
library for building user interfaces created by Facebook.

Component-based:

  • building blocks of user interfaces in React

  • React combines and draws them on a web page

  • Components can be reused

Declarative:

  • uses declarative syntax JSX

  • declarative means, we tell React what a component should look like, based on current state/data

  • abstraction away from the DOM -> we don’t have to touch the DOM directly (using JSX)

  • JSX format is a combination of HTML, CSS and JavaScript, as well as referencing other React components

State-driven:

  • change in state of a UI component automatically triggers a re-render of that component

  • React reacts to state changes by re-rendering the UI

JavaScript library:

  • Though React is often referred to as a framework, it is “only” a JavaScript library

  • React is only the “view” layer

  • Other external libraries must be included to get a full functioning web application (e.g. for routing or data-fetching)

  • There are fully-fletched web frameworks, which are include React, such as NextJS or Remix.

Extremely popular:

  • by far the most used framework

  • way more than Angular or VueJS

  • many large and smaller companies started using React

  • large community

  • gigantic third-party library ecosystem based around React

Developed by Facebook:

  • created in 2011

  • open-sourced in 2013