You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using SWR with Suspense mode (suspense: true) in React 19, tests fail to transition from loading to success/error states. Components remain stuck in the loading state and tests timeout.
Expected Behavior
Components should:
Show loading state initially
Transition to success/error state after data loads
Repro Steps / Code Example
Using SWR:
const{ data }=useSWR(key,fetcher,{suspense: true});
Bug report
Description / Observed Behavior
When using SWR with Suspense mode (
suspense: true
) in React 19, tests fail to transition from loading to success/error states. Components remain stuck in the loading state and tests timeout.Expected Behavior
Components should:
Repro Steps / Code Example
Using SWR:
Test case:
Additional Context
Environment:
SWR 2.3.0
React 19.0.0
@testing-library/react 16.1.0
The text was updated successfully, but these errors were encountered: