From ceb8387e24f9b401bd3fc693dbb0f5b220a389d0 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Wed, 11 Sep 2024 11:25:00 +0200 Subject: [PATCH] Add comment explaining asyncWrapper --- code/renderers/react/src/portable-stories.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/renderers/react/src/portable-stories.tsx b/code/renderers/react/src/portable-stories.tsx index bc031a04717e..7b906c9f4bde 100644 --- a/code/renderers/react/src/portable-stories.tsx +++ b/code/renderers/react/src/portable-stories.tsx @@ -65,6 +65,8 @@ export const INTERNAL_DEFAULT_PROJECT_ANNOTATIONS: ProjectAnnotations { 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);