Next.js Discord

Discord Forum

router.isReady does not trigger useEffect in some cases (next.js 13.5.6)

Unanswered
rformato posted this in #help-forum
Open in Discord
Hi guys, I have a scenario where I need to read a dynamic query string runtime, but I'm struggling to do it because it seems like router.isReady is never true inside my effect. Of course router.isReady is set as a dependancy of the effect. I've also found that if I run any unrelated setState in the above effect, then router.isReady changes to true and the effect is run again. Is it a known bug? Any workaround?

0 Replies