Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (38 sloc) 806 Bytes
layout title description tags category keywords date
post
理解 React 生命周期
React 生命周期调用过程
react
react
react,react-lifecycle
2015-07-24 02:38:18 -0700

Initial 客户端初始化

  1. initial
  2. getDefaultProps
  3. getInitialState
  4. componentWillMount
  5. render
  6. componentDidMount

Server-side Rendering 服务端渲染

  1. server-side Rendering
  2. getDefaultProps
  3. getInitialState
  4. componentWillMount
  5. render

Updating Props 更新 Props

  1. updating props
  2. componentWillReceiveProps
  3. shouldComponentUpdate
  4. componentWillMount
  5. render
  6. componentDidMount

Updating State 更新 states

  1. updating state
  2. shouldComponentUpdate
  3. componentWillMount
  4. render
  5. componentDidMount

Unmounting 卸载

  1. unmounting
  2. componentWillUnmount