Add client/server mention in componentDid/WillMount documentation
Christopher Chedeau committed
Mar 22, 2014 at 12:18 UTC
e55b9aa059327cfe85f78b6723b4d2dd49e95ad6
1 file changed
+2
-2
docs/docs/ref-03-component-specs.md
+2
-2
@@ -112,7 +112,7 @@ Various methods are executed at specific points in a component's lifecycle.
112
componentWillMount()
113
```
114
115
-Invoked once, immediately before the initial rendering occurs. If you call `setState` within this method, `render()` will see the updated state and will be executed only once despite the state change.
115
+Invoked once, both on the client and server, immediately before the initial rendering occurs. If you call `setState` within this method, `render()` will see the updated state and will be executed only once despite the state change.
116
117
118
### Mounting: componentDidMount
@@ -121,7 +121,7 @@ Invoked once, immediately before the initial rendering occurs. If you call `setS
121
componentDidMount()
122
```
123
124
-Invoked immediately after rendering occurs. At this point in the lifecycle, the component has a DOM representation which you can access via `this.getDOMNode()`.
124
+Invoked immediately after rendering occurs, only on the client (not on the server). At this point in the lifecycle, the component has a DOM representation which you can access via `this.getDOMNode()`.
125
126
If you want to integrate with other JavaScript frameworks, set timers using `setTimeout` or `setInterval`, or send AJAX requests, perform those operations in this method.
127