0

Description

So I'm having the following route:
<Route path='/' component={RedirectUser} />
which allows me to use this.props.location.pathname in my RedirectUser component. Except, now I have to use some props; so I changed my route like this:
<Route path='/' MyState={this.state.MyState} render={() => <RedirectUser />} />
But apparently, this way doesn't allow me to use this this.props.location.pathname as I suddenly can't acces these props anymore.

Question

How can I still access my location props if I use a Route render={{}} ?
Cédric Bloem
  • 1,447
  • 3
  • 16
  • 34

0 Answers0