Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

98
Views
isReady is true from next/route when using getInitialProps

In my application I'm using nextjs and I'm transition my app from static to SSR. On my custom App I introduced the getInitialProps function and I noticed that when I use getInitialProps function, my property isReady from the hook useRouter() is always true and the query object is empty when I have query parameters on the url.

Example:

const App = ({ Component, pageProps }: AppProps): JSX.Element => {   
   const router = useRouter()
   
 useEffect(() => {
    console.log('App route: ')
    console.log(router)
    console.log(router.isReady)
    console.log(router.query)

  }, [router])

 return ({router.isReady && <Component {...pageProps}/>})
  
}

On this scenario, what happens is that the query params "appear" later, and the console logs are printed twice due the later hydration (what makes sense). But shouldn't the isReady flag be false? on the first console? after the hydration?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!