@benlesh
@AdamRackis @davidkpiano
Here are the concerns solved by Suspense:
- Single declarative way to specify loading states decoupled from *what* is loading (GraphQL, REST, JS bundle, images) and where in the tree
- Graceful orchestration of those loading states (control over reveal order, avoiding flicker)
pre hooks (before 2019?)
React decided where you put your logic in
(life cycle methods, such as componentDidUpdate/componentDidMount)
post hooks
You decide where you put your logic in
(hooks, such as useEffect)
with suspense (for lazy loading)
You decide what code to load and when.
In the near future (with suspense for data fetching)
Reference: "A thread on what Suspense is, and isn’t."
React Podcast