javascript - Getting query parameters from react-router hash fragment -
i'm using react , react-router application on client side. can't seem figure out how following query parameters url like:
http://xmen.database/search#/?status=approved&page=1&limit=20 my routes (the path totally wrong know):
var routes = ( <route> <defaultroute handler={searchdisplay}/> <route name="search" path="?status=:status&page=:page&limit=:limit" handler={searchdisplay}/> <route name="xmen" path="candidate/:accountid" handler={xmendisplay}/> </route> ); my route working fine i'm not sure how format path parameters want. appreciate on this!
note: copy / pasted comment. sure original post!
writing in es6 , using react 0.14.6 / react-router 2.0.0-rc5. use command lookup query params in components:
this.props.location.query it creates hash of available query params in url.
Comments
Post a Comment