React Native - JS只取得了部分进展以赶上UIKit

时间:2015-04-06 11:03:13

标签: react-native

在我的应用程序中,我有一个推送新视图的NavigationIOS组件。快速导航后我发现错误" JS只取得了部分进展以赶上UIKit"。

代码是块是: https://github.com/facebook/react-native/blob/master/React/Views/RCTNavigator.m#L487-L496

The View

如何调试/解决此问题?

1 个答案:

答案 0 :(得分:0)

我现在也有这个问题,我正在等待来自facebook的错误修正。

我在GIT上分享我的代码

https://github.com/facebook/react-native/issues/65

BOOL jsGettingtooSlow =
  //    --- previously not caught up --------          ------- no longer caught up ----------
  viewControllerCount < previousReactCount && currentReactCount < previousReactCount;

  BOOL reactPushOne = jsGettingAhead && currentReactCount == previousReactCount + 1;
  BOOL reactPopN = jsGettingAhead && currentReactCount < previousReactCount;


  // We can actually recover from this situation, but it would be nice to know
  // when this error happens. This simply means that JS hasn't caught up to a
  // back navigation before progressing. It's likely a bug in the JS code that
  // catches up/schedules navigations.
  if (!(jsGettingAhead ||
        jsCatchingUp ||
        jsMakingNoProgressButNeedsToCatchUp ||
        jsMakingNoProgressAndDoesntNeedTo || 
        jsGettingtooSlow)) {
    RCTLogError(@"JS has only made partial progress to catch up to UIKit");
  }