What is Fast Refresh in React Native?

Answer

Fast Refresh is React Native's hot reloading mechanism that applies code changes to your running app in real-time — typically in under 1 second — without requiring a full reload or losing component state. How it works: when you save a file, Metro detects the change; sends only the changed modules to the running app; React's reconciler applies the new code while preserving component state where possible (state in hooks, etc.); if a change affects only a React component's render logic, state is preserved; if a change is outside React components (class changes, module initialization), a full reload is triggered automatically. Benefits over old Hot Reload: more reliable; handles more code change patterns; preserves state more consistently; automatic full refresh when needed. What gets preserved: useState values, useRef values, component state in general. What triggers full reload: changes to non-React files (utility functions with side effects), class components with lifecycle changes, syntax errors (then auto-recovers when fixed). Enabling/disabling: enabled by default. To force a full reload: shake the device → Reload, or press r in Metro terminal, or Cmd+R in iOS Simulator, R twice in Android emulator. State preservation caveat: if you add a new state variable or change the hook order, Fast Refresh may reset state. Changes to the component's body that affect existing state variables are preserved. Fast Refresh is specific to development — not active in production builds.