Skip to content

Commit

Permalink
refactor: add comment in asyncWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrezimmermannbam authored and mdjastrzebski committed Oct 23, 2023
1 parent c9b176c commit 9617a43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/helpers/asyncWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const asyncWrapper = async <T>(

let result: T;

// Wrapping with act for react version 16.9 to 17.x
await act(async () => {
result = await callback();
});
Expand Down

0 comments on commit 9617a43

Please sign in to comment.