I have routes defined like following:
<Route path="auth">
<Route path="confirm-code" component={this.getIndexRoute()} email="xyz@gmail.com" code="1234" />
</Route>
getIndexRoute()
gives me a component to navigate to. When I hit http://localhost:3000/de/auth/confirm-code/
it works.
However, I want to modify this path to be like http://localhost:3000/de/auth/confirm-code/email=someEmail&code=someCode
I would then want to pass those received email and code as props to my component so that I can process them there. right now I am hard-coding email="xyz@gmail.com" and code=1234. I would like to extract them from the url.
How to do it?