Skip to content

Commit

Permalink
RFC: First class support for promises, async/await
Browse files Browse the repository at this point in the history
Adds first class support for reading the result of a JavaScript Promise
using Suspense:

- Introduces support for async/await in Server Components. Write Server
  Components using standard JavaScript `await` syntax by defining your
  component as an async function.
- Introduces the `use` Hook. Like `await`, `use` unwraps the value of a
  promise, but it can be used inside normal components and Hooks,
  including on the client.

This enables React developers to access arbitrary asynchronous data
sources with Suspense via a stable API.
  • Loading branch information
acdlite committed Oct 13, 2022
1 parent 4f62379 commit 3a9e9da
Showing 1 changed file with 463 additions and 0 deletions.

0 comments on commit 3a9e9da

Please sign in to comment.