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 та симуляторів співбесід.

Почни безкоштовно