I'm using react router + redux + redux saga. I access the location object passed as props to my component, where I try to get the query string part of the URL.
However, the search parameter of location is always empty. Nonetheless the pathname is filled as follows:
{pathname: "/view/energy?latitude=34.06012&longitude=-118.26997&zoom=11", search: "", hash: "", key: "wsbbq0"}
Any help or debug tip is appreciated. Thanks!
Libs versions:
"react-redux": "^7.2.0",
"react-router-dom": "^5.1.2",
"redux-saga": "^1.1.3"
Index
ReactDOM.render(
<Provider store={store}>
<Router>
<Route path="/" component={App} />
<Route path="/view/:viewId" component={App} />
</Router>
</Provider>,
document.getElementById('root'));