Browse Source

Update example function name in Async blog post (#1183)

main
Tanyoung Kim 6 years ago
committed by Dan Abramov
parent
commit
83fd04aa81
  1. 2
      examples/update-on-async-rendering/fetching-external-data-after.js
  2. 2
      examples/update-on-async-rendering/fetching-external-data-before.js
  3. 2
      examples/update-on-async-rendering/updating-external-data-when-props-change-after.js
  4. 2
      examples/update-on-async-rendering/updating-external-data-when-props-change-before.js

2
examples/update-on-async-rendering/fetching-external-data-after.js

@ -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});

2
examples/update-on-async-rendering/fetching-external-data-before.js

@ -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});

2
examples/update-on-async-rendering/updating-external-data-when-props-change-after.js

@ -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});

2
examples/update-on-async-rendering/updating-external-data-when-props-change-before.js

@ -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});

Loading…
Cancel
Save