In react-router v3 I could access it with props.location.query.foo
(if the current location was ?foo=bar
)
In react-router-dom@4.0.0
props.location
only has props.location.search
with is a string like ?foo=bar&other=thing
.
Perhaps I need to manually parse and deconstruct that string to find the value for foo
or other
.
Screenshot of console.log(this.props)
:
(Note how from
?artist=band
here I'd like to get the value from artist
which is the value band
)