Why would withRouter router.query be empty on first render in NextJS? [duplicate]

This might have something to do with Automatic Static Optimization

Next.js documentation says:

Pages that are statically optimized by Automatic Static Optimization will be hydrated without their route parameters provided, i.e query will be an empty object ({}).

Leave a Comment