2

We got this awesome exemple of changing page animation, but i want to manage the global page change animation and state change animation in a form with 4 states.

There's the exemple. https://github.com/rackt/react-router/tree/master/examples/animations

I'm trying to block the update if the children props doesn't have the same amount of routes props in the nextProps argument. It doesn't work.

Can someone help me please?

Thank you

shouldComponentUpdate(nextProps) {
    console.log(this.props.children.props.routes, nextProps.children.props.routes);
    if(this.props.children.props.routes.length === nextProps.children.props.routes.length){
      return true;
    }
    return false;
  }

I got my main url "/" and when i change to "/registration", it must do a transition. When i'm on "/registration" and i go to "/registration/contact-infos" it must do another transition between the registration form states.

Crak_mboutin
  • 1,046
  • 2
  • 12
  • 18
  • Can you elaborate a little bit more on what you're trying to accomplish? It sounds like you simply need to add another `` inside the component being rendered on `/registration/contact-infos`. – Mike Dec 10 '15 at 21:34
  • I tried this, i want something with RouteCSSTransitionGroup to manage first level routes and the other i want to manage them with ReactCSSTransitionGroup. Is it possible? – Crak_mboutin Dec 10 '15 at 21:39
  • Not sure how that would work since `/registration/contact-infos` is a route so the `` will still pick it up. I would not test using `routes.length` as it will almost always be 1. Try matching using `pathname`s. – Mike Dec 10 '15 at 21:42
  • I have what I think is the same problem, I have my main pages---that I want to have a _fade_ in/out effect---and I want their sub-pages to have a _slide_ in/out. The ReactCSSTransitionGroup in the example effects them all. – izak Jan 21 '16 at 06:43

0 Answers0