React Native

React Native Basics

View, Text, Image, ScrollView, FlatList, StyleSheet, Flexbox layout

22 면접 질문·
Junior
1

What is the basic component used to create containers in React Native?

답변

The View component is the fundamental container in React Native, equivalent to a div in HTML. It allows grouping other components, applying styles, and managing layout via Flexbox. Unlike web, React Native uses View instead of div because it must be translated to native components (UIView on iOS, android.view on Android).

2

What is the main difference between Text and View in React Native?

답변

The Text component is the only component capable of displaying text in React Native. Unlike the web where any element can contain text, React Native requires all text to be wrapped in a Text component. View cannot contain raw text directly - attempting to do so generates an error.

3

How to display a local image in React Native?

답변

To display a local image in React Native, use the Image component with the source prop and the require() function. This approach allows the Metro bundler to resolve the image path at build time and optimize assets. Remote images use an object with a uri property instead.

4

Which property is required to display a remote image (URL) with the Image component?

5

What is the main difference between ScrollView and FlatList?

+19 면접 질문

다음 면접을 위해 React Native을 마스터하세요

모든 질문, flashcards, 기술 테스트, 코드 리뷰 연습, 면접 시뮬레이터에 접근하세요.

무료로 시작하기