Browse Source

Add a note about suspense

main
Dan Abramov 7 years ago
parent
commit
a2139ded8a
  1. 2
      content/blog/2018-03-15-update-on-async-rendering.md

2
content/blog/2018-03-15-update-on-async-rendering.md

@ -80,6 +80,8 @@ There is a common misconception that fetching in `componentWillMount` lets you a
> Note
>
> Some advanced use-cases (e.g. libraries like Relay) may want to experiment with eagerly prefetching async data. An example of how this can be done is available [here](https://gist.github.com/bvaughn/89700e525ff423a75ffb63b1b1e30a8f).
>
> In the longer term, the canonical way to fetch data in React components will likely be based on the “suspense” API [introduced at JSConf Iceland](/blog/2018/03/01/sneak-peek-beyond-react-16.html). Both simple data fetching solutions and libraries like Apollo and Relay will be able to use it under the hood. It is significantly less verbose than either of the above solutions, but at the moment it is not quite ready yet.
### Adding event listeners (or subscriptions)

Loading…
Cancel
Save