React native setTimeout setInterval 失效

转载:https://blog.csdn.net/DoDiligently/article/details/80106914

记录一个坑,在react native项目调试中,如果打开了Debug JS Remotely,即在chrome中打开了调试控制台,此时项目中setTimeout和setInterval的时间间隔会失效,表现为:不管延迟时间设置为多少,都是会马上执行或者没反应。
关掉chrome debug就好了。
这个问题折磨了我好久,后来发现它早就出现在react native的Issues中了 https://github.com/facebook/react-native/issues/9436

posted @ 2020-09-22 20:38  jxst441192  阅读(617)  评论(0编辑  收藏  举报