@samitouri / QOS-React-2 / commits / 46eca10046

Link to lifecycle methods from Context doc (#8062)

Dan Abramov committed Oct 23, 2016 at 14:35 UTC 46eca1004614d886ecd9b02eab287ace0e9977cd
1 file changed +6 -18
docs/docs/context.md
+6 -18
@@ -136,25 +136,13 @@ Before you build components with an API similar to this, consider if there are c
136
137 ## Referencing Context in Lifecycle Methods
138
139 -If `contextTypes` is defined within a component, the following lifecycle methods will receive an additional parameter, the `context` object:
139 +If `contextTypes` is defined within a component, the following [lifecycle methods](/react/docs/react-component.html#the-component-lifecycle) will receive an additional parameter, the `context` object:
140
141 -```javascript
142 -void componentWillReceiveProps(
143 - object nextProps, object nextContext
144 -)
145 -
146 -boolean shouldComponentUpdate(
147 - object nextProps, object nextState, object nextContext
148 -)
149 -
150 -void componentWillUpdate(
151 - object nextProps, object nextState, object nextContext
152 -)
153 -
154 -void componentDidUpdate(
155 - object prevProps, object prevState, object prevContext
156 -)
157 -```
141 +- [`constructor(props, context)`](/react/docs/react-component.html#constructor)
142 +- [`componentWillReceiveProps(nextProps, nextContext)`](/react/docs/react-component.html#componentwillreceiveprops)
143 +- [`shouldComponentUpdate(nextProps, nextState, nextContext)`](/react/docs/react-component.html#shouldcomponentupdate)
144 +- [`componentWillUpdate(nextProps, nextState, nextContext)`](/react/docs/react-component.html#componentwillupdate)
145 +- [`componentDidUpdate(prevProps, prevState, prevContext)`](/react/docs/react-component.html#componentdidupdate)
146
147 ## Referencing Context in Stateless Functional Components
148