Browse Source

Update ref-03-component-specs.md

Edit the description of componentDidMount() to make clear that the function is called only once during the lifecycle of the component, after only the initial render() call. The description is now similar to that for componentWillMount(). The existing wording does not make it clear that the function is called only after the initial render. (Granted, it is possible to infer this from descriptions of the component lifecycle found elsewhere in the documentation, but I think explicit is better than implicit in this case).
main
Mark Hintz 10 years ago
parent
commit
b61aace624
  1. 2
      docs/ref-03-component-specs.md

2
docs/ref-03-component-specs.md

@ -118,7 +118,7 @@ Invoked once, both on the client and server, immediately before the initial rend
componentDidMount()
```
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()`.
Invoked once, only on the client (not on the server), immediately after the initial rendering occurs. At this point in the lifecycle, the component has a DOM representation which you can access via `this.getDOMNode()`.
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.

Loading…
Cancel
Save