Home > Software design >  Expo iOS simulator doesn't automatically refresh React Native app upon code changes
Expo iOS simulator doesn't automatically refresh React Native app upon code changes

Time:01-10

I'm using Expo's iOS simulator with my React Native app. Before, it would live update / "fast refresh" when code changes were made, but it's no longer doing that. So this is not about using the Expo Go app on my phone, but rather the Simulator on my Macbook.

I've checked the shake (ctrl cmd Z) menu, and Fast Refresh is still enabled. Running npx expo run:ios does correctly reflect the latest code, but that takes a while to run.

Any help to debug this?

CodePudding user response:

A few days ago the same thing happened to me and it depended on how I exported the main component to App.tsx.

This one doesn't work properly:

export default () => {
  return <View/>
}

This one works:

const App = () => {
  return <View/>
}

export default App

Let me know if this helps

  • Related