# App Lifecycle & Background Execution (React Native) > AppState, foreground/background transitions, headless JS, background fetch, deep links, universal links - 20 interview questions - Mid-Level - [Interview Questions: React Native](https://sharpskill.dev/en/technologies/react-native/interview-questions.md) ## 1. What are the three possible states returned by AppState.currentState in React Native? **Answer** AppState.currentState returns one of three states: 'active' (app is in the foreground and interactive), 'background' (app is in the background but potentially running) and 'inactive' (transitional state on iOS, for example when displaying the multitasking view). On Android, 'inactive' state is rare as the transition goes directly between 'active' and 'background'. ## 2. Which method should be used to listen for application state changes with AppState? **Answer** The AppState.addEventListener('change', callback) method allows listening for application state changes. The callback receives the new state ('active', 'background' or 'inactive') as a parameter. It is important to remove the listener using the remove() method returned by addEventListener during cleanup to avoid memory leaks. ## 3. When does the 'inactive' state typically occur on iOS? **Answer** The 'inactive' state on iOS occurs during brief transitions: displaying the control center, notification center, multitasking screen (double tap Home), or during an incoming call. It is an intermediate state where the app is visible but not interactive. On Android, this state is rarely observed as the transition between 'active' and 'background' is direct. ## 17 more questions available - How to correctly implement an AppState listener in a useEffect? - What is a Headless JS Task in React Native? Sign up for free: https://sharpskill.dev/en/login ## Other React Native interview topics - [JavaScript Essentials](https://sharpskill.dev/en/technologies/react-native/interview-questions/javascript-essentials.md): 25 questions, Junior - [React Fundamentals](https://sharpskill.dev/en/technologies/react-native/interview-questions/react-fundamentals.md): 20 questions, Junior - [React Native Basics](https://sharpskill.dev/en/technologies/react-native/interview-questions/react-native-basics.md): 22 questions, Junior - [React Hooks](https://sharpskill.dev/en/technologies/react-native/interview-questions/react-hooks.md): 20 questions, Junior - [TypeScript for React & React Native](https://sharpskill.dev/en/technologies/react-native/interview-questions/typescript-for-react-native.md): 22 questions, Junior - [React Native Components & API](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-components-api.md): 20 questions, Junior - [React Native Styling & Layout](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-styling-layout.md): 18 questions, Junior - [React Native Navigation](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-navigation.md): 22 questions, Mid-Level - [React Native State Management](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-state-management.md): 24 questions, Mid-Level - [React Native Networking & API](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-networking-api.md): 20 questions, Mid-Level - [Data Persistence](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-data-persistence.md): 20 questions, Mid-Level - [Forms & Validation](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-forms-validation.md): 18 questions, Mid-Level - [React Native Animations](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-animations.md): 22 questions, Mid-Level - [Native Modules & Bridge](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-native-modules.md): 20 questions, Mid-Level - [Platform-Specific Code](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-platform-specific-code.md): 18 questions, Mid-Level - [Permissions & Device APIs](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-permissions-apis.md): 20 questions, Mid-Level - [Push Notifications](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-push-notifications.md): 18 questions, Mid-Level - [React Native Testing](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-testing.md): 20 questions, Mid-Level - [React Native Debugging](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-debugging.md): 18 questions, Mid-Level - [Build & Deployment](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-build-deployment.md): 20 questions, Mid-Level - [Expo vs React Native Bare](https://sharpskill.dev/en/technologies/react-native/interview-questions/expo-vs-bare-rn.md): 18 questions, Mid-Level - [Performance Optimization](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-performance-optimization.md): 24 questions, Senior - [Memory Management](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-memory-management.md): 20 questions, Senior - [Architecture Patterns](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-architecture-patterns.md): 22 questions, Senior - [React Native New Architecture](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-new-architecture.md): 24 questions, Senior - [Security Best Practices](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-security-best-practices.md): 20 questions, Senior - [Offline-First Architecture](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-offline-first.md): 20 questions, Senior - [React Native CI/CD](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-ci-cd.md): 20 questions, Senior - [Monorepo & Code Sharing](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-monorepo-architecture.md): 18 questions, Senior - [Advanced Topics](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-advanced-topics.md): 22 questions, Senior - [Authentication & Session Management](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-auth-session-management.md): 22 questions, Mid-Level - [Monitoring & Crash Reporting](https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-monitoring-crash-reporting.md): 20 questions, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/en/technologies/react-native/interview-questions/rn-app-lifecycle-background