GatsbyLink will result in a 404 page in development mode when target="_self" is set #29760
Unanswered
feedm3
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Today I found out that when setting
target="_self"
inGatsbyLink
, clicking on it will sometimes result in a 404 page. Obviously, this is annoying.I guess the problem is not related to
GatsbyLink
itself, but a race condition between the browser opening the page directly without the interception ofGatsbyLink
. As thetarget="_self"
on aGatsbyLink
doesn't bring any benefit, this should either result in a warning fromGatsbyLink
or not applied to the DOM at all.This problem only occurs in the development mode.
Motivation
Improve developer experience by informing the developer about unwanted behavior / side effects of the
GatsbyLink
.Beta Was this translation helpful? Give feedback.
All reactions