Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native development menu freezing in iOS emulator

From yesterday I started getting this issue in iOS emulator:

When I hit cmd+D in iOS emulator to bring up development menu, App becomes unresponsive for ~30 sec. Then when I select something (Debug in chrome for example). Menu is gone, but app is unresponsive for another 30 sec or so.

This happens with apps that are just created: react-native init testapp

In android emulator it works just fine.

Video sample (I am trying to click on menu item and then on count button every second or so): https://www.youtube.com/watch?v=O7YIGeQK9lk

Code here: https://github.com/juozapas/reactsampleapp

$ react-native --version react-native-cli: 0.1.10 react-native: 0.19.0

like image 361
Juozas Avatar asked Jan 31 '16 10:01

Juozas


People also ask

How do I fix a freeze app in React Native?

killing the application from memory - after starting the application it works again (just by closing where the application is running in the background and starting it from there doesn't help) reinstalling the application ( react-native run-android ) - works again.

Can I use React Native for iOS development?

React Native combines the best parts of native development with React, a best-in-class JavaScript library for building user interfaces. Use a little—or a lot. You can use React Native today in your existing Android and iOS projects or you can create a whole new app from scratch.

Can I use React Native iOS emulator on Windows?

It is possible to build an iOS app on Windows with React Native. With efficient tools like Codemagic, you don't need to own a MacBook to build an iOS app. Codemagic automates the process of deployment and handles all the difficult jobs for you.


1 Answers

Looking at your video, it seems that you have enabled the Slow animations debugging mode in the iOS Simulator, perhaps by accidentally pressing Cmd + T.

Try turning off the slowed animations under the Debug > Slow Animations menu or by pressing Cmd + T again.

I am not sure of the root cause of the unresponsiveness, but it is perhaps due to the native Action Sheet component animating out on the button press before the control is returned to the application.

like image 152
jevakallio Avatar answered Oct 19 '22 20:10

jevakallio