computer-scienceangular-roadmapbackend-roadmapblockchain-roadmapdba-roadmapdeveloper-roadmapdevops-roadmapfrontend-roadmapgo-roadmaphactoberfestjava-roadmapjavascript-roadmapnodejs-roadmappython-roadmapqa-roadmapreact-roadmaproadmapstudy-planvue-roadmapweb3-roadmap
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
930 B
11 lines
930 B
# Composables |
|
|
|
In the context of Vue applications, a "composable" is a function that leverages Vue's Composition API to encapsulate and reuse stateful logic. |
|
|
|
When building frontend applications, we often need to reuse logic for common tasks. For example, we may need to format dates in many places, so we extract a reusable function for that. This formatter function encapsulates stateless logic: it takes some input and immediately returns expected output. There are many libraries out there for reusing stateless logic - for example lodash and date-fns, which you may have heard of. |
|
|
|
<ResourceGroupTitle>Free Content</ResourceGroupTitle> |
|
<BadgeLink colorScheme='blue' badgeText='Official Docs' href='https://vuejs.org/guide/reusability/composables.html'>Vue.js Composables</BadgeLink> |
|
|
|
<BadgeLink colorScheme='red' badgeText='Watch' href='https://www.youtube.com/watch?v=h8yveYCbFQM'>What is a Composable? (Vue 3)</BadgeLink> |
|
|
|
|