-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add async render APIs #1365
Add async render APIs #1365
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9d9778c:
|
1ba3a97
to
c02db2e
Compare
c02db2e
to
571fbc8
Compare
1bb540d
to
5ca4927
Compare
Less renaming to-do
5ca4927
to
9d9778c
Compare
return await React.act(async () => { | ||
scope() | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty sure this should be
return await React.act(async () => { | |
scope() | |
}) | |
return await React.act(async () => { | |
await scope() | |
}) |
or
return await React.act(async () => { | |
scope() | |
}) | |
return await React.act(async () => { | |
return scope() | |
}) |
We'll with #1214 since this approach doesn't work for libraries like user-event that rely on |
Not final. For internal testing for now. Alternate to #1214
render(...)
->await renderAsync(...)
act(...)
->await actAsync(...)
cleanup(...)
->await cleanupAsync(...)
renderHook(...)
->await renderHookAsync(...)