Browse Source

add cancellation topic to AJAX FAQ

main
Alex 8 years ago
committed by Alex Krolick
parent
commit
a904140005
  1. 4
      content/docs/faq-ajax.md

4
content/docs/faq-ajax.md

@ -58,3 +58,7 @@ class MyComponent extends React.Component {
}
}
```
### Cancellation
Note that if the component unmounts before an AJAX call is complete, you may see a warning like `cannot read property 'setState' of undefined`. If this is an issue you may want to keep track of inflight AJAX requests and cancel them in the `componentWillUnmount` lifecycle method.

Loading…
Cancel
Save