React Native

Architecture Patterns

Component architecture, atomic design, feature-based structure, clean architecture, SOLID

22 câu hỏi phỏng vấn·
Senior
1

What is component architecture in a React Native application?

Câu trả lời

Component architecture involves structuring the application into reusable and independent elements, each with a single responsibility. This approach promotes code reuse, simplifies unit testing, and improves maintainability. Each component encapsulates its own state, logic, and presentation, enabling complex interfaces to be built from simple, composable building blocks.

2

In the Atomic Design pattern, what are the five component levels from smallest to largest?

Câu trả lời

Atomic Design, created by Brad Frost, organizes components into five levels: Atoms (basic elements like Button, Text), Molecules (groups of atoms like SearchInput), Organisms (complete sections like Header), Templates (page layouts) and Pages (template instances with real data). This methodology facilitates the creation of consistent and scalable design systems.

3

What is the main advantage of a feature-based project structure over a file-type-based structure?

Câu trả lời

A feature-based structure groups all files related to a functionality in the same folder (components, hooks, services, tests). This improves code cohesion and facilitates navigation since everything related to a feature is in one place. Unlike a type-based structure where files are scattered, this approach reduces context switching and simplifies removing or modifying an entire feature.

4

What does the SOLID 'S' (Single Responsibility Principle) mean when applied to React Native components?

5

In Clean Architecture, which layer contains the application's business rules?

+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í