When code runs with concurrent rendering and async workflows, ensure any async/derived value that can affect what gets rendered (or how consumers behave) is deterministic per concurrent “world”, and make promise behavior explicit.
Apply these rules: 1) Don’t use refs for render-visible concurrency state
2) Make enable/disable transitions deterministic
enabled toggles (e.g., reuse the same promise, or deterministically reject when disabled).3) Be explicit about awaiting vs fire-and-forget
void queryClient.resumePausedMutations()
4) Treat CI-only failures as race-condition signals
These practices prevent incorrect hydration/selection during concurrent rendering, clarify async semantics, and reduce flaky test outcomes caused by nondeterministic scheduling.
Enter the URL of a public GitHub repository