Search code examples
iosreactjsreact-nativedropboxexpo

Expo on iOS is constantly refreshing my React Native app on MacOS, caused by Dropbox / iCloud


I'm building a simple React Native app and using the Expo iOS app to run it. But Expo is constantly refreshing my app, making it unusable / untestable. It refreshes every few seconds, sometimes multiple times a second, when I haven't changed anything. The only times when there is enough of a break between refreshes for me to test out the app is when, in my terminal, the app decides to rebuild (Again, nothing changed) and takes a few seconds to rebuild the bundle.

I set up the app using create-react-native-app and run it with npm start -- I've changed nothing else, besides adding a few components.

I've tried quitting my IDE (Sublime) and changing to a stronger wifi network.

I'm developing on macOS Sierra 10.12.2 and running on an iPhone 6S.


Solution

  • It turns out this happened because my app's code was stored inside a Dropbox folder. (The same applies to iCloud backups.)

    I guess that Dropbox's / iCloud's syncing interferes with watchman or other Expo / React Native internals.

    I solved the problem by removing the app's directory from my Dropbox folder.