mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 04:12:34 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user