next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Warn when a query is provided to `as` but not `href`

Open Timer opened this issue 7 years ago • 4 comments

Pointed out in https://github.com/zeit/next.js/pull/8022, Next.js doesn't provide guidance that the href must also provide the query string used in as. We should add a useful warning or suggestion in this case.

Timer avatar Jul 18 '19 11:07 Timer

I've encountered this error many times when developing NextJS apps. The terrible thing about this is that everything works when you make this mistake but the Link acts like an actual link and initiates a serverside request (clearing ApolloClient cache, etc).
This turns into a headache when every new developer keeps bumping into this error and silently breaks the production cache.
Shouldn't this be resolved right now? as it is in 9.0.X backlog.

HosseinAgha avatar Feb 10 '20 15:02 HosseinAgha

I would like to try to work on this issue. I see that there is a closed merge request linked, but it doesn't say why exactly it was not merged. Is there something I need to be aware of?

mikhalev-im avatar Aug 31 '20 17:08 mikhalev-im

This issue is no longer needed since as is no longer needed in most cases on the current canary release (soon stable)

timneutkens avatar Sep 01 '20 07:09 timneutkens

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

balazsorban44 avatar Jan 29 '22 15:01 balazsorban44