React Native

App Lifecycle & Background Execution

AppState, foreground/background transitions, headless JS, background fetch, deep links, universal links

20 คำถามสัมภาษณ์·
Mid-Level
1

What are the three possible states returned by AppState.currentState in React Native?

คำตอบ

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?

คำตอบ

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?

คำตอบ

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.

4

How to correctly implement an AppState listener in a useEffect?

5

What is a Headless JS Task in React Native?

+17 คำถามสัมภาษณ์

หัวข้อสัมภาษณ์ React Native อื่นๆ

JavaScript Essentials

Junior
25 คำถาม

React Fundamentals

Junior
20 คำถาม

React Native Basics

Junior
22 คำถาม

React Hooks

Junior
20 คำถาม

TypeScript for React & React Native

Junior
22 คำถาม

React Native Components & API

Junior
20 คำถาม

React Native Styling & Layout

Junior
18 คำถาม

React Native Navigation

Mid-Level
22 คำถาม

React Native State Management

Mid-Level
24 คำถาม

React Native Networking & API

Mid-Level
20 คำถาม

Data Persistence

Mid-Level
20 คำถาม

Forms & Validation

Mid-Level
18 คำถาม

React Native Animations

Mid-Level
22 คำถาม

Native Modules & Bridge

Mid-Level
20 คำถาม

Platform-Specific Code

Mid-Level
18 คำถาม

Permissions & Device APIs

Mid-Level
20 คำถาม

Push Notifications

Mid-Level
18 คำถาม

React Native Testing

Mid-Level
20 คำถาม

React Native Debugging

Mid-Level
18 คำถาม

Build & Deployment

Mid-Level
20 คำถาม

Expo vs React Native Bare

Mid-Level
18 คำถาม

Performance Optimization

Senior
24 คำถาม

Memory Management

Senior
20 คำถาม

Architecture Patterns

Senior
22 คำถาม

React Native New Architecture

Senior
24 คำถาม

Security Best Practices

Senior
20 คำถาม

Offline-First Architecture

Senior
20 คำถาม

React Native CI/CD

Senior
20 คำถาม

Monorepo & Code Sharing

Senior
18 คำถาม

Advanced Topics

Senior
22 คำถาม

Authentication & Session Management

Mid-Level
22 คำถาม

Monitoring & Crash Reporting

Senior
20 คำถาม

เชี่ยวชาญ React Native สำหรับการสัมภาษณ์ครั้งถัดไป

เข้าถึงคำถามทั้งหมด flashcards แบบทดสอบเทคนิค แบบฝึกหัด code review และตัวจำลองสัมภาษณ์

เริ่มใช้ฟรี