Update componentDidMount link (#316)

Currently when clicking this link, it tries to open link as `https://reactjs.org/https://reactjs.org/docs/react-component.html#mounting` and just spins.
This commit is contained in:
Mike Wilcox
2017-11-20 21:46:25 -05:00
committed by Dan Abramov
parent 6f14533812
commit 654c6b7df9

View File

@@ -12,7 +12,7 @@ You can use any AJAX library you like with React. Some popular ones are [Axios](
### Where in the component lifecycle should I make an AJAX call?
You should populate data with AJAX calls in the [`componentDidMount`](https://reactjs.org/docs/react-component.html#mounting) lifecycle method. This is so you can use `setState` to update your component when the data is retrieved.
You should populate data with AJAX calls in the [`componentDidMount`](/docs/react-component.html#mounting) lifecycle method. This is so you can use `setState` to update your component when the data is retrieved.
### Example: Using AJAX results to set local state