seniorVue.js

Design Pattern: The 'Container/Presenter' (Smart/Dumb) Pattern in Vue 3

Updated May 4, 2026

Short answer

This pattern separates data fetching/business logic (Container) from the visual representation (Presenter).

Deep explanation

In large apps, components often become bloated with API calls and state management. The Container component (Smart) handles Pinia stores, API requests, and logic, then passes pure data down to the Presenter (Dumb) via props. The Presenter emits events back up. This makes Presenters highly reusable and easy to test with tools like Storybook, as they have no external dependencies.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Vue.js interview questions

View all →