Tagged articles
Composition API
46 articles · Page 1 of 1
Vue 3 discourages the traditional Mixins pattern due to naming conflicts, unclear origins, namespace pollution, and complex inheritance, and recommends the Composition API, which offers explicit imports, conflict avoidance, better TypeScript support, organized code, and improved testability, along with migration steps for existing projects.
Composition APITypeScriptVue3
0 likes · 5 min read

Vue3 replaces the problematic mixins pattern of Vue2 with a powerful Composition API, offering explicit dependencies, clearer source tracing, better TypeScript support, and easier maintenance, as illustrated by code examples and a real‑world fintech migration case.
Composition APITypeScriptVue3
0 likes · 5 min read

Vue 3.6.0‑beta.1 brings the long‑awaited Vapor Mode to feature parity (except Suspense), claims benchmark‑level performance comparable to Solid and Svelte 5, overhauls the reactivity system with alien‑signals, and offers an opt‑in, composition‑API‑only path with clear limitations for existing projects.
Composition APIReactivitySolidJS
0 likes · 6 min read

The article explains how Vue 3’s Composition API resolves the naming conflicts, hidden dependencies, and reusability limits of Vue 2 mixins, showcases practical code examples, and describes a real‑world fintech migration that makes component logic clearer and more maintainable.
Composition APIFrontend DevelopmentTypeScript
0 likes · 6 min read

Vue 3 replaces the once‑popular mixins pattern with the Composition API, offering explicit dependencies, clearer source tracing, better TypeScript support, and improved maintainability, as illustrated by a fintech trading platform’s migration from tangled mixins to clean, reusable composition functions.
Composition APIJavaScriptTypeScript
0 likes · 6 min read

This article examines the growing complexity of a points‑mall front‑end, identifies architectural and code‑organization pain points, and demonstrates how applying Clean Architecture together with Vue 3's Composition API can decouple business logic from UI, improve maintainability, and streamline development.
Composition APIclean architecturesoftware design
0 likes · 22 min read

The article explains why Vue 3 no longer recommends the Mixins pattern, outlines its drawbacks such as naming conflicts and unclear data origins, and demonstrates how the Composition API provides a clearer, more maintainable alternative for reusable logic.
Composition APIFrontend DevelopmentJavaScript
0 likes · 5 min read

This article provides a comprehensive comparison between Vue 2 and Vue 3, covering changes in reactivity implementation, the introduction of the Composition API, lifecycle hook updates, component caching, data binding techniques, state‑management alternatives, storage options, and numerous code snippets that illustrate each concept for developers preparing for interviews or upgrading projects.
Composition APIJavaScriptVue2
0 likes · 25 min read

Vue3’s Composition API replaces mixins with explicit, reusable functions, eliminating naming conflicts, hidden dependencies, and improving TypeScript support, as illustrated by a fintech trading platform migration case study. The article also compares the golden age of mixins, outlines their pitfalls, and provides code examples for a smooth transition.
Composition APIJavaScriptTypeScript
0 likes · 6 min read

Vorms is a 12KB, TypeScript‑based form validation library built with Vue 3's Composition API that offers strong typing, tree‑shakable size, easy integration, and flexible support for Yup, Zod and custom rules, making form handling both simple and powerful.
Composition APIForm ValidationTypeScript
0 likes · 5 min read

This article explains the evolution of Vue development, introduces Vue Hooks as the core of the Composition API, demonstrates their advantages over Mixins with clear code examples, and provides best‑practice guidelines and common pitfalls for building maintainable, reusable front‑end components.
Composition APIJavaScriptVue
0 likes · 14 min read

This article walks through the practical steps for migrating a Vue2 project to Vue3, covering script‑setup syntax, composition‑API patterns, removal of mixins and global variables, file‑naming conventions, and reusable composable functions to achieve a cleaner, more maintainable codebase.
Best PracticesComposition APIScript Setup
0 likes · 11 min read

This article details a step‑by‑step migration from Vue 2 to Vue 3, emphasizing the use of the latest Vue 3 version, TypeScript typings, replacing mixins with composition functions, adopting Pinia for state management, and demonstrating how to share and protect reactive state with composition APIs.
Composition APIPiniaState Management
0 likes · 8 min read

Vue’s reusable logic pattern, called Composables, are functions built with the Composition API that encapsulate reactive state via ref and lifecycle hooks, follow a use‑prefix naming convention, and let developers like the mouse‑tracker example share stateful behavior across components cleanly.
ComposablesComposition APIVue
0 likes · 5 min read

This comprehensive tutorial walks through Pinia's core concepts—including stores, defineStore, reactive integration, devtools, plugins, TypeScript support, SSR handling, and mapping helpers—providing step‑by‑step code examples and detailed explanations for building robust Vue 3 applications.
Composition APIDevToolsPinia
0 likes · 26 min read

This article explains what Hooks are, demonstrates how to use them in Vue 3, and guides readers through building reusable custom Hook functions such as useMouse and useTable, covering pagination, parameter handling, and best practices for clean, maintainable frontend code.
Composition APIJavaScriptVue
0 likes · 23 min read

This article provides a comprehensive comparison between Vue 2 and Vue 3, detailing their architectural differences, new features such as the Composition API, TypeScript support, fragments, teleport, suspense, virtual‑DOM optimizations, and guidance on state management, build tools, and migration strategies.
Composition APIFrontend DevelopmentJavaScript
0 likes · 20 min read

This article provides a comprehensive overview of Vue 3's new composition API functions—defineProps, defineEmits, defineExpose, defineOptions, and defineSlots—explaining their purposes, basic usage, practical examples, and suitable scenarios, helping developers master component communication, reuse, and advanced configuration in modern frontend development.
Composition APIVue3defineProps
0 likes · 13 min read


ByteFEMay 10, 2024 · Frontend Development
This article explains the concept of custom hooks—known as the Composition API—in Vue 3, discusses when and why to use them for logic reuse, provides practical examples and code snippets, and shares a curated list of useful Vue 3 hook libraries and resources.
Composition APICustom HooksJavaScript
0 likes · 9 min read

This article explains what Vue 3 custom hooks (Composition API) are, why they are useful for logic reuse, shows how to create both business‑specific and highly reusable hooks with practical code examples, and lists popular open‑source hook libraries for developers.
Composition APICustom HooksVue3
0 likes · 8 min read

This article introduces Vue 3 Hooks, explains their relationship to the Composition API, compares them with mixins and class‑based patterns, provides best‑practice guidelines, and offers multiple TypeScript code examples for creating, using, and managing custom hooks to improve code reuse and maintainability.
Composition APIJavaScriptVue
0 likes · 17 min read

This article explains how to create a generic useList hook for Vue 3 that handles pagination, data fetching, filtering, resetting, exporting, and customizable success/error hooks, complete with TypeScript generics and Element‑Plus UI integration.
Composition APIPaginationTypeScript
0 likes · 13 min read

This tutorial walks through creating a Vue 3 project, explains key changes and the differences between Option API and Composition API, demonstrates useful CLI commands, and provides detailed examples of custom composable hooks such as useWindowSize, usePagination, and useFetch, along with best practices.
Composition APICustom HooksOption API
0 likes · 19 min read

This article explains how to convert state‑driven Element‑Plus Dialog components into a command‑style API using a custom useCommandComponent hook, discusses the drawbacks of traditional Dialog handling, outlines required component conventions, provides implementation code, and offers practical usage examples for Vue developers.
Composition APIDialogVue
0 likes · 11 min read

The article explains how Vue 3 improves upon Vue 2 by replacing Object.defineProperty with Proxy for reactivity, introducing a refined runtime renderer, a compiler that transforms templates into render functions, and new features such as the Composition API, script setup, and built‑in components like Fragment and Teleport.
Composition APIFrontend DevelopmentReactivity
0 likes · 6 min read


JD TechFeb 21, 2023 · Frontend Development
This article introduces Vue 3's latest capabilities—including the Composition API, setup syntax sugar, Pinia state management, and advanced reactive patterns—demonstrating how they simplify component logic, improve code reuse, and enhance maintainability for modern frontend development.
Composition APIPiniaVue3
0 likes · 16 min read

This article walks through building a reusable Icon component with Vue3's Composition API, covering directory layout, prop definitions, TypeScript typing, CSS variable styling, local and global registration, type augmentation, and the use of the defineOptions macro for component naming.
CSS-variablesComponent RegistrationComposition API
0 likes · 25 min read

This article explains how to recreate Vue 3's computed API using the composition API, covering getter/setter handling, effect integration, caching with a dirty flag, dependency tracking, and trigger mechanisms, and provides step‑by‑step code examples to build a functional ComputedRef implementation.
Composition APIJavaScriptReactivity
0 likes · 10 min read

This article walks through ten common Vue 3 migration scenarios—parent‑child data flow, two‑way binding, router navigation, context access, slots, component caching, logic reuse, lifecycle hooks, global APIs, and TypeScript integration—providing clear explanations and complete code examples for each case.
Composition APIScript SetupTypeScript
0 likes · 16 min read

This article presents a comprehensive guide to Vue 3 advanced features, covering the use of createVNode and render for dynamic component creation, JSX/TSX advantages, dependency injection with provide/inject, Composition API patterns, utility hooks, global component registration, script‑setup syntax, and the latest v‑model usage, all illustrated with practical code examples.
Composition APIGlobal ComponentsJSX
0 likes · 19 min read

This article explains the restrictions of using Vue 3 Composition API lifecycle hooks inside asynchronous setup code, demonstrates the warning Vue emits, and shows how the framework links hooks to component instances through its source code, offering a safe way to inject hooks asynchronously.
Async SetupComposition APIlifecycle hooks
0 likes · 13 min read

This article provides a comprehensive overview of Vue 3—including its release details, performance gains, core architectural changes such as Proxy‑based reactivity, TypeScript support, the new Composition API (setup, ref, reactive, computed, watch, watchEffect), updated lifecycle hooks, new built‑in components like Fragment, Teleport and Suspense, project scaffolding with Vue‑CLI or Vite, and migration considerations from Vue 2.
Composition APIJavaScriptVite
0 likes · 14 min read

This article explores Vue 3’s built‑in TypeScript support, its new Proxy‑based reactivity, performance improvements such as static patch flags and hoisting, tree‑shaking capabilities, and practical usage of the Composition API with code examples and migration tips from Vue 2.
Composition APIReactivitytree-shaking
0 likes · 15 min read

This article provides a comprehensive guide to Vue 3, covering its performance improvements, tree‑shaking support, Composition API, new global APIs, lifecycle changes, reactive system enhancements, and practical code examples to help developers migrate from Vue 2 to Vue 3 efficiently.
Composition APIJavaScriptVue3
0 likes · 13 min read

This article explains Vue 3's Composition API, covering how to create reactive data with ref and reactive, use toRefs, define computed properties, apply readonly, watch and watchEffect, handle lifecycle hooks, pass props, and share state via provide and inject, all with practical code examples.
Composition APIJavaScriptRef
0 likes · 8 min read

This article explores common Vue3 questions—whether to adopt the Composition API, performance impacts of mixing APIs, the absence of this in setup, differences between reactive and ref, and migration pitfalls—providing practical guidance and code examples for developers transitioning from Vue2.
Composition APIOptions APIRef
0 likes · 9 min read

This article walks through preparing a Vue 3 + TypeScript project, explains the concept of setup sugar and its benefits, demonstrates the new compiler‑macro APIs such as defineProps, defineEmits and defineExpose, introduces useful hook APIs, covers Vue 3.2 additions like v‑memo and style‑variable binding, and provides tips for i18n, debugging and common pitfalls.
Composition APIScript SetupVolar
0 likes · 17 min read

This article explores why React moved from class components to the Hooks API, explains its functional‑programming roots, compares Hooks with Redux, Mixins, HOCs, Vue's Composition API, and demonstrates how TypeScript type inference and codata concepts can deepen understanding while providing practical code examples.
Composition APIReactVue
0 likes · 21 min read

The article thoroughly examines Vue 3’s Composition API, explaining its motivation over the Options API, detailing its function‑based design and TypeScript advantages, addressing concerns about complexity, and offering practical guidance on when and how to adopt it for cleaner, more maintainable component logic.
Best PracticesComposition APILogic Reuse
0 likes · 12 min read

This article explores the motivations behind React's Hooks API, contrasts it with the Class API, delves into functional programming concepts, demonstrates implementations via Mixins, HOCs, and custom hooks, and compares React Hooks to Vue's Composition API, offering deep insights for front‑end developers.
Composition APIReactTypeScript
0 likes · 22 min read

This article provides a comprehensive overview of Vue 3, covering its evolution from Vue 2, key new features such as TypeScript support, the Composition API, performance optimizations, the modular monorepo structure, the reactivity system built on Proxy, and the Vite development server that powers its ecosystem.
Composition APIJavaScriptReactivity
0 likes · 28 min read

Vant 3.0 delivers a full Vue 3 migration, refactoring all components with the Composition API, adding emits options and Teleport support, shrinking bundle size, introducing Badge, Popover and Cascader components, a new Vant Use 1.0 logic library, and upgraded CLI tooling while maintaining Vue 2 compatibility.
Composition APIFrontend DevelopmentJavaScript framework
0 likes · 7 min read


ByteFEDec 9, 2020 · Frontend Development
This article explains how to use Vue 3.0’s Composition API, TypeScript support, and custom render capabilities to create a mini‑program framework, covering file structure, VNode implementation, nodeOps adaptation, template compilation, and dynamic template selection with full code examples.
Composition APICustom RendererFrontend Development
0 likes · 23 min read

This article provides a comprehensive Vue 3 composition‑API tutorial covering project initialization, the setup function, reactive and ref utilities, computed properties, watch, provide/inject, template refs, and nextTick, with detailed code examples and explanations.
Composition APIProvide/InjectRef
0 likes · 18 min read


Aotu LabOct 10, 2020 · Frontend Development
This guide walks through using Vue3’s Composition API, Teleport, Fragments, script‑setup, and style‑vars within Taro, covering installation, project setup, code examples for each feature, build commands, and compatibility notes for both H5 and mini‑program targets.
Composition APIFrontend DevelopmentScript Setup
0 likes · 13 min read

This article chronicles Vue's journey from its first 0.6.0 release through major milestones like 1.0, 2.0, and the upcoming 3.0, explains the architectural changes, reactive system overhaul, Composition API, and provides practical code examples for migration and local experimentation.
Composition APIFrontend DevelopmentJavaScript
0 likes · 20 min read
