Vue.js / Nuxt.js

Vue Architecture

Component design patterns, folder structure, feature modules, domain-driven design, composables organization

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

What is a feature-first architecture in Vue/Nuxt?

Câu trả lời

A feature-first architecture organizes code by business features rather than by technical type. Each feature contains its components, composables, stores, and types in a dedicated folder. This approach improves maintainability by grouping everything related to a feature in one place, facilitates teamwork as developers can work on independent features, and makes code more modular by allowing easy activation/deactivation of features.

2

What is the Container/Presentational pattern in Vue?

Câu trả lời

The Container/Presentational pattern separates components into two categories: containers that handle business logic, API calls and state, and presentational that only receive props and emit events. This separation improves UI component reusability, facilitates unit testing of presentational components, and clarifies responsibilities by isolating logic in containers.

3

What is the difference between a layer-first and feature-first architecture?

Câu trả lời

Layer-first architecture organizes code in technical layers (components, composables, stores, utils) where all components are together, all composables together, etc. Feature-first groups by business features where each feature contains its own components, composables and stores. Layer-first is simpler for small projects but becomes difficult to maintain when the project grows as files related to the same feature are scattered. Feature-first scales better and facilitates teamwork.

4

What are renderless components in Vue?

5

How to organize composables in a feature-first architecture?

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

Nắm vững Vue.js / Nuxt.js 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í