In case you were wondering
React is component-based and everything is a component: the whole page is divided into small parts which together create the view.
Fun fact: when React v0.14 got released in 2015, the Facebook codebase had over 15,000 React components.
The main ReactJS feature is the Virtual-DOM, where data can only go one-way. When there are changes to the data contained in the state of a component, the view of that component and all of its children is re-rendered and updated. This is achieved by comparing two copies of the virtual DOM, the original and the updated, one of the reasons why React is preferred for real-time applications.
Whenever you call
setState on a component, React will mark it as dirty: it then looks at all the dirty components and re-renders them and their children.
React has reached 60 percent market share, which, as the article says, is unprecedented for a web framework.
- Backed by Facebook
- 1285 developers contributing
- Backed by Google
- Counts 869 developers
- No major company backing 😭
- 269 contributors
According to npm, both React and Angular’s numbers are high enough to indicate these they will remain supported for the next few years.
React is used for all sorts of websites:
Components are also easy to reuse, simply by importing them at the top of the file. This helps massively to keep your code DRY.
import ICanBeReusedAllTheTime from './someComponent.js'
Loved by lots of developers, according to Stack Overflow
Oh and the documentation is really good!