From 5d67a8a31a7c6e78cb4cc0d33414124adc69ff06 Mon Sep 17 00:00:00 2001 From: tayfuryldzz Date: Sun, 27 Sep 2026 01:10:54 +0300 Subject: [PATCH] fix: update Next.js example to createSmoothFetch --- examples/nextjs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/nextjs/README.md b/examples/nextjs/README.md index ecbe18b..ec2fa9a 100644 --- a/examples/nextjs/README.md +++ b/examples/nextjs/README.md @@ -48,7 +48,7 @@ or call the routes directly with the curl commands below. ### `/api/resilient` — retry + fallback -This route points `createResilientFetch` at `/unstable-data`, which returns a +This route points `createSmoothFetch` at `/unstable-data`, which returns a mix of `200`, `429`, and `500` responses. With the default retry settings, a retryable status (`429`/`500`/...) causes the client to back off and try again (up to the default number of retries). Because `/unstable-data` never fails @@ -72,7 +72,7 @@ library does **not** fall back to its browser `alert()` behavior on the server. ### `/api/circuit-demo` — circuit breaker -This route points `createResilientFetch` at `/always-fail`, which always returns +This route points `createSmoothFetch` at `/always-fail`, which always returns `500`, with `failureThreshold: 3` and a short `cooldownMs` so the demo is quick. Call it repeatedly and watch the behavior change: