What could be causing this slow fetch in react native?

前端 未结 3 2180
闹比i
闹比i 2021-02-20 05:38

In the following code, the first console.log message prints pretty much instantly. Then everything just hangs (I\'m initially assumed it was waiting for the body of the respons

相关标签:
3条回答
  • 2021-02-20 06:33

    It is a known bug that parsing responses can lag badly when remote debugging is enabled. Disabling remote debugging should speed this up a lot.

    You can read the issue for details and other workarounds.

    0 讨论(0)
  • 2021-02-20 06:45

    As you've found out yourself, this is a known bug that should be fixed in react-native v0.31

    0 讨论(0)
  • 2021-02-20 06:45

    What worked for me is moving the fetch calls inside the constructor of a react component. Otherwise they never resolve. Hope this helps

    0 讨论(0)
提交回复
热议问题