From 0c96df0cd1f932000ec4b1a737a0c35b43c8eba9 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 29 Nov 2018 23:46:00 +0000 Subject: [PATCH] Add Suspense and lazy to API reference (#1446) * Add Suspense and lazy to API reference * Update content/docs/reference-react.md Co-Authored-By: gaearon * Simplify --- content/docs/reference-react.md | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/content/docs/reference-react.md b/content/docs/reference-react.md index b00bd559..8e83f3a8 100644 --- a/content/docs/reference-react.md +++ b/content/docs/reference-react.md @@ -58,6 +58,13 @@ See [Using React without JSX](/docs/react-without-jsx.html) for more information - [`React.createRef`](#reactcreateref) - [`React.forwardRef`](#reactforwardref) +### Suspense + +Suspense lets components "wait" for something before rendering. Today, Suspense only supports one use case: [loading components dynamically with `React.lazy`](/docs/code-splitting.html#reactlazy). In the future, it will support other use cases like data fetching. + +- [`React.lazy`](#reactlazy) +- [`React.Suspense`](#reactsuspense) + * * * ## Reference @@ -289,3 +296,44 @@ In the above example, React passes a `ref` given to `` el As a result, after React attaches the ref, `ref.current` will point directly to the `