2

我们得到了这个改变页面动画的真棒示例,但我想以具有 4 个状态的表单管理全局页面更改动画和状态更改动画。

这就是例子。 https://github.com/rackt/react-router/tree/master/examples/animations

如果子道具在 nextProps 参数中没有相同数量的路线道具,我会尝试阻止更新。它不起作用。

有人能帮助我吗?

谢谢

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;
  }

我得到了我的主网址“/”,当我更改为“/registration”时,它必须进行转换。当我在“/registration”并转到“/registration/contact-infos”时,它必须在注册表状态之间进行另一次转换。

4

0 回答 0