React Native interview questions

25 questions from the React Native course, each with the correct answer and an explanation. Try to answer before you open the answer.

React Native Foundations

1. What does a React Native `<View>` become at runtime?

  1. A canvas drawing made by JavaScript
  2. An HTML div inside a WebView
  3. A real native platform view such as UIView or android.view.View
  4. A screenshot of a web page
Show answer

Answer: A real native platform view such as UIView or android.view.View

React Native renders native UI, not a web page.

Lesson: What React Native Is

2. What does Expo prebuild (Continuous Native Generation) do?

  1. Generates the native ios and android projects from app config and config plugins
  2. Compiles JavaScript into Swift
  3. Uploads the app to the stores
  4. Removes the need for a JavaScript engine
Show answer

Answer: Generates the native ios and android projects from app config and config plugins

Native folders become generated output.

Lesson: Expo or the React Native CLI

3. Which prop handles a tap on a Pressable?

  1. href
  2. onClick
  3. onTap
  4. onPress
Show answer

Answer: onPress

Mobile components use press events.

Lesson: Core Components

Styling and Layout

4. What is the default flexDirection in React Native?

  1. row
  2. column
  3. row-reverse
  4. There is no Flexbox in React Native
Show answer

Answer: column

Mobile screens are usually vertical, so children stack vertically.

Lesson: StyleSheet and Flexbox

5. What does useSafeAreaInsets return?

  1. The device pixel ratio
  2. The distances to keep clear at each screen edge, such as notches and the home indicator
  3. The keyboard height only
  4. A list of all open screens
Show answer

Answer: The distances to keep clear at each screen edge, such as notches and the home indicator

Insets keep content out of unsafe areas.

Lesson: Responsive Layouts and Safe Areas

6. How do you give iOS and Android different implementations of the same component file?

  1. Add a CSS media query for each OS
  2. Wrap the file in a Platform component
  3. Use two separate repositories
  4. Create Component.ios.tsx and Component.android.tsx and import ./Component
Show answer

Answer: Create Component.ios.tsx and Component.android.tsx and import ./Component

Metro resolves platform extensions automatically.

Lesson: Platform-Specific Code

Lists, Input and Touch

7. Why prefer FlatList over ScrollView for a 5,000-item feed?

  1. FlatList virtualises, rendering only items near the visible area
  2. ScrollView cannot scroll vertically
  3. FlatList downloads data automatically
  4. ScrollView only works on iOS
Show answer

Answer: FlatList virtualises, rendering only items near the visible area

Virtualisation keeps memory and render time bounded.

Lesson: FlatList and SectionList

8. Which TextInput prop receives the new text on every change?

  1. onKeyUp
  2. onInput
  3. onChangeText
  4. onValue
Show answer

Answer: onChangeText

onChangeText passes the string directly.

Lesson: TextInput, Forms and the Keyboard

9. Why use react-native-gesture-handler for a pan gesture?

  1. It replaces the JavaScript engine
  2. It is required for any onPress handler
  3. It recognises gestures natively, so they stay smooth even when JavaScript is busy
  4. It only works on the web
Show answer

Answer: It recognises gestures natively, so they stay smooth even when JavaScript is busy

Native recognition avoids JS-thread delays.

Lesson: Touch and Gestures

Navigation

10. In Expo Router, what does a file named app/product/[id].tsx create?

  1. A dynamic route such as /product/42 with an id parameter
  2. A product database table
  3. A tab bar icon
  4. A native module called id
Show answer

Answer: A dynamic route such as /product/42 with an id parameter

Square brackets mark dynamic segments.

Lesson: Expo Router and React Navigation

11. What should you usually pass as a navigation parameter?

  1. The entire Redux store
  2. A whole component instance
  3. A callback function for the next screen
  4. A small serialisable value such as an id
Show answer

Answer: A small serialisable value such as an id

Screens load their own data so deep links work too.

Lesson: Params and Deep Links

12. What is a good way to keep signed-out users out of app screens?

  1. Hide the screens with opacity 0
  2. Render different route groups or redirect based on auth state
  3. Ask users not to press back
  4. Store the password in a global variable
Show answer

Answer: Render different route groups or redirect based on auth state

Navigation follows the auth state.

Lesson: Authentication Flows

Data and State

13. What does TanStack Query mainly manage for you?

  1. Native view layout
  2. Server state: caching, deduplication, retries and refetching of remote data
  3. App signing keys
  4. Push notification tokens on the server
Show answer

Answer: Server state: caching, deduplication, retries and refetching of remote data

It treats remote data as a cache.

Lesson: Fetching Data

14. Where should an access token be stored?

  1. In the app bundle at build time
  2. In AsyncStorage as plain text
  3. In a global JavaScript variable only
  4. In secure storage such as expo-secure-store (Keychain/Keystore)
Show answer

Answer: In secure storage such as expo-secure-store (Keychain/Keystore)

Secrets belong in OS-protected storage.

Lesson: Storing Data on the Device

15. Where does the list of products loaded from your API best live?

  1. In a server-state cache such as TanStack Query
  2. In a global variable updated by hand
  3. In AsyncStorage on every render
  4. In route params of every screen
Show answer

Answer: In a server-state cache such as TanStack Query

Server data needs caching and refetching, not just storage.

Lesson: State Management Choices

Device Features

16. When is the best time to request camera permission?

  1. Never; the camera works without permission
  2. Immediately on first launch for every permission
  3. In context, when the user starts a feature that needs the camera
  4. Only after the app is published
Show answer

Answer: In context, when the user starts a feature that needs the camera

Context-aware requests are granted more often.

Lesson: Permissions and Device APIs

17. Which service delivers push notifications to iOS devices?

  1. The Metro bundler
  2. Firebase Hosting
  3. Apple Push Notification service (APNs)
  4. AsyncStorage
Show answer

Answer: Apple Push Notification service (APNs)

Android uses FCM; iOS uses APNs.

Lesson: Push Notifications

18. Which tool lets you write native modules in Swift and Kotlin with a declarative DSL?

  1. The Expo Modules API
  2. AsyncStorage
  3. StyleSheet.create
  4. The Metro bundler config
Show answer

Answer: The Expo Modules API

Expo modules work in Expo and bare React Native apps.

Lesson: Native Modules

Performance and UX

19. Why can a long computation in a press handler make an app feel frozen?

  1. It forces the app to reinstall
  2. It deletes the native views
  3. It disables the GPU
  4. It blocks the JavaScript thread, delaying updates and JS-driven animations
Show answer

Answer: It blocks the JavaScript thread, delaying updates and JS-driven animations

One busy thread delays everything that depends on it.

Lesson: Avoiding Re-renders and Heavy JS Work

20. What does useNativeDriver: true in the Animated API do?

  1. Allows animating any layout property such as width
  2. Runs the animation on the native side so a busy JS thread does not stutter it
  3. Converts the app to native code
  4. Disables the animation on Android
Show answer

Answer: Runs the animation on the native side so a busy JS thread does not stutter it

It works for properties like transform and opacity.

Lesson: Animations

21. How does Hermes improve start-up time?

  1. It removes all JavaScript from the app
  2. It precompiles JavaScript to bytecode at build time
  3. It renders views with WebGL
  4. It downloads the bundle from a CDN on every launch
Show answer

Answer: It precompiles JavaScript to bytecode at build time

Less parsing work at launch.

Lesson: Images, App Size and Hermes

Testing, Releasing and Monitoring

22. Which tool is designed for end-to-end tests on a real app?

  1. Platform.select
  2. StyleSheet
  3. AsyncStorage
  4. Maestro or Detox
Show answer

Answer: Maestro or Detox

E2E tools drive the app on a simulator or device.

Lesson: Testing

23. Which change can be shipped with an OTA update?

  1. A JavaScript bug fix that does not change native code
  2. Adding a new native camera library
  3. Requesting a new iOS permission
  4. Upgrading to a new Expo SDK with native changes
Show answer

Answer: A JavaScript bug fix that does not change native code

OTA updates replace JS and assets only.

Lesson: Building and Releasing

24. Why upload source maps to a crash reporter?

  1. To enable OTA updates
  2. To make the app bundle smaller
  3. So minified production stack traces map back to your original source
  4. To request permissions
Show answer

Answer: So minified production stack traces map back to your original source

Readable traces make crashes fixable.

Lesson: Debugging and Monitoring

25. Which item belongs on a React Native release checklist?

  1. Use array indexes as list keys
  2. Store access tokens in AsyncStorage for speed
  3. Profile performance in a release build on a low-end device
  4. Ship native changes through OTA updates
Show answer

Answer: Profile performance in a release build on a low-end device

Release builds on real devices show true performance.

Lesson: A React Native Release Checklist

← Back to the course