[solved] ReactRouter V4 redirect

Hi all!

export default class Routes extends React.Component {
    render() {
      return (
        <div>
          <Route exact path='/' render={()=>(<Redirect to="/catalog" />)} />
        <Switch>
          <Route exact path='/catalog' component={Catalog}/>
          <Route path='/catalog/:cat' component={Cat} />
        </Switch>
      </div>
    )
  }
}

If i go to “/catalog”, component renders ok,
if i go to root “/”, url changed to “/catalog” as expected, but nothing renders,
why?

Hello, is your Routes component or the Catalog component wrapped in something ?

I once had this problem, and it was coming from the fact that I wrapped a mapStateToProps around my component the wrong way.

If route to “/catalog” works as expected, and component rendered properly, this mean that’s all wrapped properly?

In some miraculous way, after add real data (createContainer) to component, which is wait for subscription data, redirect started working…
:relieved: