Collapse JSXExpressionContainer → AwaitExpression → JSXElement (#12109)

This commit is contained in:
Jed Fox authored and GitHub committed 2022-01-16 14:59:22 -05:00
1 parent 76ae21044c
commit f29a7565e9
4 files changed
+90 -2

No files matched your search

+18 -1
View File
@@ -1,4 +1,4 @@
#### Inline `await` expressions in JSX (#12088 by @j-f1)
#### Inline `await` expressions in JSX (#12088 & #12109 by @j-f1)
`await` expressions in JSX are now inlined if their argument would be inlined.
@@ -9,6 +9,11 @@
someVeryLongExpression
)}
{await (
<div>Lorem ipsum ...</div>
)}
// Prettier stable
{
await Promise.all(
@@ -16,8 +21,20 @@
)
}
{
await (
<div>Lorem ipsum ...</div>
)
}
// Prettier main
{await Promise.all(
someVeryLongExpression
)}
{await (
<div>Lorem ipsum ...</div>
)}
```