-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gatsby-link] to
should be of type string or location object
#3309
Comments
Yeah, we don't currently support the location version — for no particular reason :-) Happy to take a PR to gatsby-link adding support! |
This was referenced Dec 23, 2020
This was referenced Mar 15, 2024
This was referenced Mar 16, 2024
This was referenced Mar 16, 2024
This was referenced Mar 16, 2024
This was referenced Mar 16, 2024
This was referenced Mar 17, 2024
This was referenced Mar 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
gatsby-link
does not accept a location object as specified in react-router as a valid prop.Environment
Gatsby version: 1.9.119
Node.js version: 8.9.1
Operating System: macOS 10.13.2
Actual result
<Link to={{ pathname: '/my-page', search: '?sort=name', }} />
Passing an object to the
to
prop ofLink
results in a url of "/[object Object]"Expected behavior
Url should be "/my-page?sort=name"
...
Current work around is to use Link directly from
react-router-dom
The text was updated successfully, but these errors were encountered: