From f9c851e38ce41314273aa2861f04b80ba18ff76b Mon Sep 17 00:00:00 2001 From: eps1lon Date: Sun, 12 Sep 2021 12:10:46 +0200 Subject: [PATCH] Document expected "missing act" --- src/__tests__/end-to-end.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/__tests__/end-to-end.js b/src/__tests__/end-to-end.js index cf222aec..787a944d 100644 --- a/src/__tests__/end-to-end.js +++ b/src/__tests__/end-to-end.js @@ -17,6 +17,8 @@ function ComponentWithLoader() { let cancelled = false fetchAMessage().then(data => { if (!cancelled) { + // Will trigger "missing act" warnings in React 18 with real timers + // Need to wait for an action on https://github.com/reactwg/react-18/discussions/23#discussioncomment-1087897 setState({data, loading: false}) } })