Vue.js / Nuxt.js

Vue Architecture

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

22 perguntas de entrevista·
Senior
1

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

Resposta

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?

Resposta

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?

Resposta

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 perguntas de entrevista

Domine Vue.js / Nuxt.js para sua proxima entrevista

Acesse todas as perguntas, flashcards, testes tecnicos, exercicios de code review e simuladores de entrevista.

Comece gratis