Why React?

Declarative

  • React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.
  • Declarative views make your code more predictable and easier to debug.

Component-Based

  • Build encapsulated components that manage their own state, then compose them to make complex UIs.
  • Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep the state out of the DOM.

Native Approach

  • React can be used to create mobile applications as well using React Native.

Reusability

  • React provides a component-based structure. You can divide your whole application into components and start building them one at a time.
  • The main thing here to notice is, you can make a different component for the one whose functionality/logic can be used in multiple components and this component is known as the Reusable component.

Data Binding

  • React uses one-way data binding and an application architecture called Flux controls the flow of data to components through one control point – the dispatcher. It complements React components by the unidirectional data flow.

Developer Tools

  • React Developer Tools and Redux Developer Tools. Both can be installed as Chrome extensions.
  • Developer Tools will make debugging in React apps a lot easier.

Performance

  • Updating DOM is usually the bottleneck when it comes to web performance.
  • React provides a way to solve these issues using Virtual DOM, a DOM kept in memory.
  • This will make React apps render faster and quicker, leading it to have better performance.
  • This is the main reason behind React’s high performance.

❗️ NOTE: We will learn about Virtual DOM in the upcoming section.

Easy to learn

  • Anyone with a basic knowledge of HTML, CSS & JavaScript (es6) can learn React and develop an application on top of React.
← Getting StartedBasic React app using Pure JavaScript β†’