React native works very slow on android

前端 未结 3 786
一整个雨季
一整个雨季 2021-01-17 16:28

By \'Very slow\' i mean, it loads a single transition about 5 second despite this is just a simple example app.

Here is the whole app RN code

Take a look at

3条回答
  •  情歌与酒
    2021-01-17 16:42

    This saved me a lot of time:

    • Search your code for "console.log", and comment them before testing.
    • Turn off "JS Dev Mode"

    You will want to make sure that you turn off "JS Dev Mode," or else it will run painfully slow on device.

    This is how you disable JS Dev Mode on Android:

    After running "react-native run-android" you should "shake" your device to bring up the menu. Select "Dev Settings" then uncheck "JS Dev Mode."

    After that run "react-native run-android" again and it should be more performant, at least I hope for you :)

    Source: https://github.com/aksonov/react-native-router-flux/issues/199

提交回复
热议问题