I thought you could do this with react-native run-android --dev=false
, but doing this doesn't stop the developer menu from showing up when I shake the phone and the request url to the packager has dev=true
in the url params.
With the help of Headless JS, Native Modules, and WorkManager, it is fairly easy to create and run JavaScript tasks in React Native. In this article, we covered from beginning to end setting up and running Headless JS in React Native Android, allowing us to run tasks in the background of our application.
Development mode includes useful warnings and gives you access to tools that make development and debugging easier. Production mode minifies your code and better represents the performance your app will have on end users' devices.
There are two configurations Release
and Debug
. By default apps run in debug
mode. To run in Release
mode
react-native run-android --variant release #android
react-native run-ios --configuration Release #ios
To find other available options
react-native run-ios -h
react-native run-android -h
It's in the dev menu under the settings option. The key is that you then have to reload the JS. You can verify in your packager output that dev=false
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With