Skip to content

Commit

Permalink
Add note about Promise polyfill for React.lazy (#1556)
Browse files Browse the repository at this point in the history
* Add note about Promise polyfill for React.lazy

Fixes #1552

* Backticks
  • Loading branch information
alexkrolick committed Jan 15, 2019
1 parent 60dd46d commit 165ae04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/docs/reference-react.md
Expand Up @@ -310,6 +310,10 @@ const SomeComponent = React.lazy(() => import('./SomeComponent'));
Note that rendering `lazy` components requires that there's a `<React.Suspense>` component higher in the rendering tree. This is how you specify a loading indicator.
> **Note**
>
> Using `React.lazy`with dynamic import requires Promises to be available in the JS environment. This requires a polyfill on IE11 and below.
### `React.Suspense`
`React.Suspense` let you specify the loading indicator in case some components in the tree below it are not yet ready to render. Today, lazy loading components is the **only** use case supported by `<React.Suspense>`:
Expand Down

0 comments on commit 165ae04

Please sign in to comment.