Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: First class support for promises and async/await #229

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Oct 16, 2022

  1. RFC: First class support for promises, async/await

    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.
    acdlite committed Oct 16, 2022
    Configuration menu
    Copy the full SHA
    d40a465 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2022

  1. Edit to remove dead link

    gaearon committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    d7ebb73 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2022

  1. Grammar fix (#3)

    coryhouse committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    5c123c6 View commit details
    Browse the repository at this point in the history
  2. Syntax fix (#1)

    * RFC: First class support for promises, async/await
    
    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.
    
    * Syntax fix
    
    Co-authored-by: Andrew Clark <git@andrewclark.io>
    Artur93gev and acdlite committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    9c21ca1 View commit details
    Browse the repository at this point in the history