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 16, 2022
1 parent 4f62379 commit d40a465
Showing 1 changed file with 475 additions and 0 deletions.
Loading

0 comments on commit d40a465

Please sign in to comment.