You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off - really loving v4 and the flexibility it provides! Thanks for your hard work!
In the alpha, you could access the parsed search string off of the location object, so that /route?doTheThing=absolutely could be accessed in a route via location.query.doTheThing. Do y'all ever plan to support that in v4, or should I be using some other lib to parse location.search? I've got it working with query-string for now (first parser I found) which works just fine, but it does seem nice to have access to that parsed string via the RR API instead of needing to pull in another dependency. Then again, given the more simplified API in general, I could also see an argument for leaving it up to consumers to choose how they want to handle that string themselves. Or maybe it'd go in as a part of the history API?
Mostly just trying to see if y'all have already made a decision one way or the other. If it's something you'd consider adding, I'd be up for taking a stab at it.
Thanks!
The text was updated successfully, but these errors were encountered:
@kgoggin you may be interested in react-router-parsed, a microlibrary I made that wraps <Route> with parsing logic you specify and injects parsed params and query into the route component.
I have found everything goes more smoothly if I pass in the parsed values to my Route components as props, rather than parsing match.params.whatever or location.search within my Route components.
lockbot
locked as resolved and limited conversation to collaborators
Sep 18, 2018
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
First off - really loving v4 and the flexibility it provides! Thanks for your hard work!
In the alpha, you could access the parsed search string off of the location object, so that
/route?doTheThing=absolutely
could be accessed in a route vialocation.query.doTheThing
. Do y'all ever plan to support that in v4, or should I be using some other lib to parselocation.search
? I've got it working with query-string for now (first parser I found) which works just fine, but it does seem nice to have access to that parsed string via the RR API instead of needing to pull in another dependency. Then again, given the more simplified API in general, I could also see an argument for leaving it up to consumers to choose how they want to handle that string themselves. Or maybe it'd go in as a part of the history API?Mostly just trying to see if y'all have already made a decision one way or the other. If it's something you'd consider adding, I'd be up for taking a stab at it.
Thanks!
The text was updated successfully, but these errors were encountered: