React Native

React Native Networking & API

fetch API, axios, async/await, error handling, API integration, AbortController

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

What is the native JavaScript method for making HTTP requests in React Native?

คำตอบ

fetch is the native API built into JavaScript and React Native for making HTTP requests. It returns a Promise and allows handling GET, POST, PUT, DELETE requests without external dependencies. Unlike axios, fetch is available natively without installing any package.

2

What does the fetch() method return when an HTTP request fails with a 404 or 500 code?

คำตอบ

fetch() always resolves the Promise successfully as long as the network request completes, even for HTTP error codes like 404 or 500. You need to check response.ok or response.status manually to detect HTTP errors. fetch() only rejects the Promise for actual network errors like no connection.

3

What is the main advantage of axios over fetch for HTTP requests?

คำตอบ

axios automatically transforms JSON data into JavaScript objects and handles HTTP error codes by rejecting the Promise. With fetch, you need to call response.json() manually and check response.ok. axios also offers interceptors, simplified cancellation, and better default timeout handling.

4

What is the correct syntax for sending JSON data with fetch in POST?

5

How does async/await simplify HTTP request handling compared to chained Promises?

+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 คำถาม

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 คำถาม

App Lifecycle & Background Execution

Mid-Level
20 คำถาม

Authentication & Session Management

Mid-Level
22 คำถาม

Monitoring & Crash Reporting

Senior
20 คำถาม

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

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

เริ่มใช้ฟรี