- One-way data binding with props
Properties (commonly, props) are passed to a component from the parent component.
Whenever any prop value changes, the component's render function is called allowing the component to display the change.
- Stateful components
States hold values throughout the component and can be passed to child components through props.
- Virtual DOM
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 sub components that actually change.
- Lifecycle methods
Lifecycle methods are hooks which allow execution of code at set points during the component's lifetime.
shouldComponentUpdate allows the developer to prevent unnecessary re-rendering of a component by returning false
if a render is not required.
componentDidMount is called once the component has 'mounted' (the component has been created in
the user interface, often by associating it with a DOM node). This is commonly used to trigger data loading from a
remote source via an API.
render is the most important lifecycle method and the only required one in any component.
It is usually called every time the component's data is updated, reflecting changes in the user interface.
to structure component rendering using syntax familiar to many developers. React components are typically written using JSX,
syntax created by Facebook for PHP, XHP.
- Architecture beyond HTML
The basic architecture of React applies beyond rendering HTML in the browser. For example, Facebook has dynamic
charts that render to