<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/when-logic-belongs-in-a-composable-ytfjclxaj" -->

---
title: When Logic Belongs in a Composable | daily.dev
description: Part 3 of a Vue architecture series focused on deciding when to extract logic into a composable. The core principle presented is to extract responsibility...
canonical: https://daily.dev/posts/when-logic-belongs-in-a-composable-ytfjclxaj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: When Logic Belongs in a Composable | daily.dev
og:description: Part 3 of a Vue architecture series focused on deciding when to extract logic into a composable. The core principle presented is to extract responsibility...
og:url: https://daily.dev/posts/when-logic-belongs-in-a-composable-ytfjclxaj
og:image: https://api.daily.dev/og/posts/YtFjClXaj.png
og:image:alt: When Logic Belongs in a Composable
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# When Logic Belongs in a Composable

**[Luka Jioshvili](https://daily.dev/sources/pfxtypf8xr4p0r03orauw)** · [@lazydoomslayer](https://daily.dev/lazydoomslayer) · 1 min read · 9 upvotes · 3 comments

## Summary

Part 3 of a Vue architecture series focused on deciding when to extract logic into a composable. The core principle presented is to extract responsibility rather than lines of code, emphasizing that composables should have a clear, distinct purpose rather than being created purely for code length reduction.

## Content

Part 3 of my Vue architecture series is out.

This article isn't about how to write composables.

It's about deciding when logic deserves its own home.

The rule I keep coming back to is:

> Extract responsibility, not lines of code.

Curious how others decide when to extract logic into a composable.

📖 DEV: [https://dev.to/lazydoomslayer/how-i-build-vue-3-applications-part-3-when-logic-belongs-in-a-composable-2bpe](https://dev.to/lazydoomslayer/how-i-build-vue-3-applications-part-3-when-logic-belongs-in-a-composable-2bpe)

📖 Medium: [https://medium.com/@lazydoomslayer/how-i-build-vue-3-applications-part-3-when-logic-belongs-in-a-composable-5bac4b7968b6](https://medium.com/@lazydoomslayer/how-i-build-vue-3-applications-part-3-when-logic-belongs-in-a-composable-5bac4b7968b6)

#vue #typescript #architecture #frontend #webdev

## Community discussion

Top comments from developers on daily.dev.

**@tim5** · 0 upvotes

> Very nice series of articles! Well written, clearly structured and helpful illustrations. I am definitely going to read the ones to come!
>
> One question that popped into my mind - I am using Nuxt more often than "plain vue". Nuxt is much more opiniated about folder structure, but I think your basic principle of "Responsibility first, Feature second" could work as well. What do you think?

## Similar posts on daily.dev

- [How I Learned to Structure React Projects Around Change, Not Folders](https://daily.dev/posts/how-i-learned-to-structure-react-projects-around-change-not-folders-ccelaqkhn) · Medium · 121 upvotes · 5 comments
- [Vertical Slice Architecture: Where Does the Shared Logic Live?](https://daily.dev/posts/vertical-slice-architecture-where-does-the-shared-logic-live--hxzktyqjf) · Milan Jovanović · 80 upvotes · 4 comments
- [Designers already think in React](https://daily.dev/posts/designers-already-think-in-react-rbce4lfse) · thoughbot · 6 upvotes · 1 comments
- [Why are we talking about architecture again?](https://daily.dev/posts/why-are-we-talking-about-architecture-again--qeiyintcw) · ITNEXT · 19 upvotes · 3 comments
- [Why composition – not reactivity – leads UI’s future](https://daily.dev/posts/why-composition-not-reactivity-leads-ui-s-future-f4mmef3az) · LogRocket · 2 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#typescript](https://daily.dev/tags/typescript), [#vuejs](https://daily.dev/tags/vuejs)

[View this post on daily.dev](https://daily.dev/posts/when-logic-belongs-in-a-composable-ytfjclxaj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/when-logic-belongs-in-a-composable-ytfjclxaj","headline":"When Logic Belongs in a Composable","text":"Part 3 of a Vue architecture series focused on deciding when to extract logic into a composable. The core principle presented is to extract responsibility rather than lines of code, emphasizing that composables should have a clear, distinct purpose rather than being created purely for code length reduction.","url":"https://daily.dev/posts/when-logic-belongs-in-a-composable-ytfjclxaj","datePublished":"2026-07-14T17:56:08.683Z","dateModified":"2026-09-13T21:34:21.710Z","author":{"@type":"Person","name":"Luka Jioshvili","url":"https://daily.dev/lazydoomslayer","image":"https://media.daily.dev/image/upload/s--sPBwrMdf--/f_auto/v1783082510/avatars/avatar_pFxtypF8xr4P0R03oRauW?_a=BAMAMicg0","description":"Full-Stack Software Engineer | Vue.js • TypeScript • NestJS • Rust • Python","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":1120}},"image":"https://media.daily.dev/image/upload/s--VmQ5m89l--/f_auto/v1784052441/posts/YtFjClXaj?_a=BAMAMicg0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":9},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"comment":[{"@type":"Comment","text":"Very nice series of articles! Well written, clearly structured and helpful illustrations. I am definitely going to read the ones to come!\nOne question that popped into my mind - I am using Nuxt more often than “plain vue”. Nuxt is much more opiniated about folder structure, but I think your basic principle of “Responsibility first, Feature second” could work as well. What do you think?","datePublished":"2026-07-15T11:57:23.310Z","url":"https://daily.dev/posts/YtFjClXaj#c-tHHQQXbWP","author":{"@type":"Person","name":"Tim","url":"https://daily.dev/tim5","image":"https://media.daily.dev/image/upload/s--NXPVqjs6--/f_auto/v1784128575/avatars/avatar_3b5l0aREdUDVZUCQLzRGp?_a=BAMAMicg0"}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/pfxtypf8xr4p0r03orauw","name":"Luka Jioshvili"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Luka Jioshvili","item":"https://daily.dev/sources/pfxtypf8xr4p0r03orauw"},{"@type":"ListItem","position":3,"name":"When Logic Belongs in a Composable"}]}
```

