Files
test-repo/changelog_unreleased/javascript/12088.md
T

519 B

Inline await expressions in JSX (#12088 & #12109 by @j-f1)

await expressions in JSX are now inlined if their argument would be inlined.

// Input
{await Promise.all(
  someVeryLongExpression
)}

{await (
  <div>Lorem ipsum ...</div>
)}


// Prettier stable
{
  await Promise.all(
    someVeryLongExpression
  )
}

{
  await (
    <div>Lorem ipsum ...</div>
  )
}


// Prettier main
{await Promise.all(
  someVeryLongExpression
)}

{await (
  <div>Lorem ipsum ...</div>
)}