React Core Principles

React virtual DOM (don't touch the DOM). React will do it.

Imperative Programming: Changing directly the DOM through JS (e.g. getElementById). This approach has that it becomes difficult to point and identify relationships between events.

Declarative Programming: Declares to React what the state or data should look like. React will make the decision of how to implement it. This state is one big JavaScript object. Resulting in less complexity, and faster developer times.

Components

Put them together and they form bigger components and the whole app. You can copy these components and reuse them.

Components are built with JSX. JSX stands for JavaScript XML. JSX allows us to write HTML with JavaScript.

Reusable components and we can use many component NPM packages. E.g React.Bootstrap, Blueprint etc.

Unidirectional Data Flow.

Anytime we want something to change state has to change.

Data flows one way. State changes and trickle down. Data can't move up.

This could allow for easier debugging.

Angular is often thought as the opposite.

React is not a framework

Angular is a framework and gives you everything.

React is a library and lets you use any tools you want from outside.

React Everywhere

React Native

React Desktop and React 360 (VR)