React Native

React Native Navigation

React Navigation, Stack Navigator, Tab Navigator, Drawer Navigator, deep linking

22 câu hỏi phỏng vấn·
Mid-Level
1

Which package should be installed to use React Navigation in a React Native application?

Câu trả lời

The @react-navigation/native package is the core package of React Navigation. It provides the base components and context needed for navigation. Specific navigators like Stack, Tab, or Drawer are separate packages to install based on project requirements.

2

Which component must wrap the application to enable React Navigation?

Câu trả lời

NavigationContainer is the root component that must wrap the entire navigation structure. It manages the navigation state, linking, and provides the necessary context to all child navigators. Without this component, navigators will not work properly.

3

How to navigate to a screen named 'Details' with React Navigation?

Câu trả lời

The navigation.navigate('Details') method is the standard way to navigate to a screen in React Navigation. It pushes the screen onto the stack if it's not already the active screen, or returns to the existing instance if the screen is already in the navigation stack.

4

How to pass parameters when navigating to a screen?

5

How to access navigation parameters in a screen?

+19 câu hỏi phỏng vấn

Nắm vững React Native cho lần phỏng vấn tiếp theo

Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.

Bắt đầu miễn phí