react-url-query
react-url-query copied to clipboard
updateUrlQuery.js:111 Uncaught TypeError: _urlQueryConfig2.default.history.replace is not a function
Do you want to request a feature or report a bug? Bug
What is the current behavior? Installed the REACT-ROUTER-V4-REDUX example.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar. Whenever a button is clicked to change the url query param, the url does not update and this error is present in the console: updateUrlQuery.js:111 Uncaught TypeError: _urlQueryConfig2.default.history.replace is not a function
What is the expected behavior? Should update url with query param
Which versions of react-url-query, and which browser and OS are affected by this issue? Did this work in previous versions of react-url-query? latest version of react-url-query macOS, Chrome latest.
I'm was getting this until I pointed package.json to pull react-url_query from its relative path, rather than the '1.0.0', that was hard-coded.
git diff examples/react-router-v4-and-redux/package.json
--- a/examples/react-router-v4-and-redux/package.json
+++ b/examples/react-router-v4-and-redux/package.json
@@ -12,7 +12,7 @@
"react-redux": "^4.4.5",
"react-router": "^4.1.1",
"react-router-dom": "^4.1.1",
- "react-url-query": "1.0.0",
+ "react-url-query": "file:../../",
"redux": "^3.6.0"
},
"scripts": {
After that the example works just fine. @pbeshai, let me know if I should submit a PR changing all examples to point to the local react-url-query instead.