Skip to content

Commit

Permalink
Add comment explaining asyncWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Sep 11, 2024
1 parent e672f1f commit ceb8387
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/renderers/react/src/portable-stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export const INTERNAL_DEFAULT_PROJECT_ANNOTATIONS: ProjectAnnotations<ReactRende
unstable_advanceTimersWrapper: (cb) => {
return act(cb);
},
// For more context about why we need disable act warnings in waitFor:
// https://github.com/reactwg/react-18/discussions/102
asyncWrapper: async (cb) => {
const previousActEnvironment = getReactActEnvironment();
setReactActEnvironment(false);
Expand Down

0 comments on commit ceb8387

Please sign in to comment.