mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 03:42:14 +00:00
Update example function name in Async blog post (#1183)
This commit is contained in:
committed by
Dan Abramov
parent
74e254a394
commit
83fd04aa81
@@ -6,7 +6,7 @@ class ExampleComponent extends React.Component {
|
||||
|
||||
// highlight-range{1-8}
|
||||
componentDidMount() {
|
||||
this._asyncRequest = asyncLoadData().then(
|
||||
this._asyncRequest = loadMyAsyncData().then(
|
||||
externalData => {
|
||||
this._asyncRequest = null;
|
||||
this.setState({externalData});
|
||||
|
||||
@@ -6,7 +6,7 @@ class ExampleComponent extends React.Component {
|
||||
|
||||
// highlight-range{1-8}
|
||||
componentWillMount() {
|
||||
this._asyncRequest = asyncLoadData().then(
|
||||
this._asyncRequest = loadMyAsyncData().then(
|
||||
externalData => {
|
||||
this._asyncRequest = null;
|
||||
this.setState({externalData});
|
||||
|
||||
@@ -45,7 +45,7 @@ class ExampleComponent extends React.Component {
|
||||
}
|
||||
|
||||
_loadAsyncData(id) {
|
||||
this._asyncRequest = asyncLoadData(id).then(
|
||||
this._asyncRequest = loadMyAsyncData(id).then(
|
||||
externalData => {
|
||||
this._asyncRequest = null;
|
||||
this.setState({externalData});
|
||||
|
||||
@@ -31,7 +31,7 @@ class ExampleComponent extends React.Component {
|
||||
}
|
||||
|
||||
_loadAsyncData(id) {
|
||||
this._asyncRequest = asyncLoadData(id).then(
|
||||
this._asyncRequest = loadMyAsyncData(id).then(
|
||||
externalData => {
|
||||
this._asyncRequest = null;
|
||||
this.setState({externalData});
|
||||
|
||||
Reference in New Issue
Block a user