We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
props.location.search
The search value of a page's location prop is not updated when the URL query parameter is changed.
search
location
What should happen? search should be updated with the value of the new query string.
What happened. search remains the value it was when the component was mounted.
System: OS: Linux 4.9 Ubuntu 14.04.5 LTS, Trusty Tahr CPU: x64 Intel(R) Xeon(R) CPU @ 2.30GHz Shell: 4.3.11 - /bin/bash Binaries: Node: 8.9.4 - ~/.nvm/versions/node/v8.9.4/bin/node Yarn: 1.7.0 - ~/.nvm/versions/node/v8.9.4/bin/yarn npm: 6.1.0 - ~/.nvm/versions/node/v8.9.4/bin/npm npmPackages: gatsby: ^1.9.232 => 1.9.273 gatsby-link: ^1.6.39 => 1.6.45 gatsby-plugin-favicon: ^2.1.1 => 2.1.1 gatsby-plugin-react-helmet: ^2.0.7 => 2.0.11 gatsby-plugin-react-next: ^1.0.11 => 1.0.11 gatsby-plugin-resolve-src: ^1.0.0 => 1.1.3 gatsby-plugin-segment: ^1.0.2 => 1.0.2 gatsby-plugin-sitemap: ^1.2.25 => 1.2.25 gatsby-plugin-styled-components: ^2.0.9 => 2.0.11 npmGlobalPackages: gatsby-cli: 1.1.58
The text was updated successfully, but these errors were encountered:
Never mind, found the problem. I was using window.history.pushState instead of navigateTo to change the query parameters. Closing now.
window.history.pushState
navigateTo
Sorry, something went wrong.
No branches or pull requests
Description
The
search
value of a page'slocation
prop is not updated when the URL query parameter is changed.Steps to reproduce
Expected result
What should happen?
search
should be updated with the value of the new query string.Actual result
What happened.
search
remains the value it was when the component was mounted.Environment
The text was updated successfully, but these errors were encountered: