-
Notifications
You must be signed in to change notification settings - Fork 594
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
Array in query params #383
Comments
It was not a good idea |
@nickvoronin-ellation I think
and then use that in your connected components, or put it into a context. |
With the former library, react-router-redux, you could use history-query-enhancer on your history before passing it to to configureStore, like this: import { createBrowserHistory } from 'history';
import withQuery from 'history-query-enhancer';
import queryString from 'query-string';
const history = withQuery(queryString)(createBrowserHistory()); And have location working with query parsed by your library of choice. @agriffis: What would be great is if you could pass an option so it uses the existing query instead of trying to parse location.search itself, so we wouldn't have to use both connect and withRouter in the same component. I could write a PR for it myself, if @supasate would be willing to accept it. |
Fixed in #396. |
In my app I store array of params in query string like this
?foo=bar&foo=qux
. When I want to get these values I am not able to do it using connected-react-router because it stores only the last value in query field.So in order to access these values I use
parse
from query-string lib. It would be more convenient if I could get these values directly from router reducer.Is this expected behavior or should I create a PR to address this issue?
The text was updated successfully, but these errors were encountered: