React.js

Overview

A javascript library for building user interface

https://facebook.github.io/react/index.html

  • Declarative

  • Component based

  • Learn once, write anywhere

Component Lifecycle

  • initial

  • getDefaultProps

  • getInitialState

  • componentWillMount

  • render

  • componentDidMount

Updating

  • componentWillReceiveProps(if receive props)

  • shouldComponentUpdate (always return true by default)

  • componentWillUpdate

  • render

  • componentDidUpdate

Unmount

  • componentWillUnmount

Last updated

Was this helpful?