Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native works very slow on android

Tags:

react-native

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 onPressFeed

like image 893
stkvtflw Avatar asked Feb 17 '16 06:02

stkvtflw


1 Answers

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

like image 118
Tiberiu Mihai Avatar answered Nov 16 '22 17:11

Tiberiu Mihai