mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-25 23:05:23 +00:00
Merge pull request #745 from nateq314/patch-1
Fix cDU to correctly make async request
This commit is contained in:
@@ -25,7 +25,7 @@ class ExampleComponent extends React.Component {
|
||||
|
||||
// highlight-range{1-5}
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
if (prevState.externalData === null) {
|
||||
if (this.state.externalData === null) {
|
||||
this._loadAsyncData(this.props.id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user