Open amannn opened 3 weeks ago
The asChild API doesn't work reliably with Server Components. It somehow works to some extent, but when children are declared with async or have a call to use(promise) internally, then the rendering fails.
asChild
async
use(promise)
asChild should work reliably everywhere.
https://x.com/souporserious/status/1753859984344121754
Please see the StackBlitz examples.
@vladmoroz any updates over here? I just ran into the issue
Bug report
Current Behavior
The
asChild
API doesn't work reliably with Server Components. It somehow works to some extent, but when children are declared withasync
or have a call touse(promise)
internally, then the rendering fails.Expected behavior
asChild
should work reliably everywhere.Reproducible example
use(promise)
Suggested solution
https://x.com/souporserious/status/1753859984344121754
Your environment
Please see the StackBlitz examples.