DevTools Settings

Current Position: bottom-right | Theme: auto

SWR Cache DevTools Demo

Explore various SWR usage patterns and cache behaviors in this interactive demo application

Error HandlingDEMO

Error handling and retry mechanisms demo

How to use SWR Cache DevTools

When you run each demo, the SWR cache state will be displayed in real-time in the DevTools at the bottom of the page. You can enable edit mode to directly modify cache values.

Error Handling Demo

Experience SWR's error handling, retry features, and fallback mechanisms

Error Simulation Settings

Current Test: Normal Endpoint

Basic Error Handling

errorRetryCount: 3errorRetryInterval: 1s
Fetching data...

Custom Retry

Retry: 0 timesExponential Backoff
Retrying...

Fallback Features

shouldRetryOnError: falseFallback Enabled
Loading fallback...
Fallback Data
Message: Fallback Data
Timestamp: 1:27:01 PM
※ This is fallback data
How to Use This Demo
  • • Select different endpoints to test various error cases
  • • Change retry count to see different retry strategies
  • • Observe error states and retry behavior in DevTools
  • • Experience graceful degradation with fallback functionality