Browse Source

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.
main
Mike Wilcox 7 years ago
committed by Dan Abramov
parent
commit
654c6b7df9
  1. 2
      content/docs/faq-ajax.md

2
content/docs/faq-ajax.md

@ -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

Loading…
Cancel
Save