Recommended ordering of methods from mounting to the render stage :
static
methods
constructor()
getChildContext()
componentWillMount()
componentDidMount()
componentWillReceiveProps()
shouldComponentUpdate()
componentWillUpdate()
componentDidUpdate()
componentWillUnmount()
- click handlers or event handlers such as
onClickSubmit()
oronChangeDescription()
- getter methods for render such as
getSelectReason()
orgetFooterContent()
- optional render methods such as
renderNavigation()
orrenderProfilePicture()
render()
Comments