Vue Adaptable Composables

•
1.3k
•

Builds library-grade Vue 3 composables that seamlessly handle reactive and non-reactive inputs.

This skill empowers Claude to architect production-ready Vue 3 composables by implementing the adaptable pattern. It ensures functions can accept plain values, refs, or getters—using MaybeRef and MaybeRefOrGetter types—and correctly normalizes them using modern reactivity APIs like toValue() and toRef(). By standardizing how inputs are handled within watchers and effects, this skill helps developers create flexible, reusable logic that remains predictable and performant across diverse implementation contexts in Vue and Nuxt projects.

主な機能

01Implements MaybeRef and MaybeRefOrGetter type patterns for flexible APIs
02Configures watchers and effects for predictable reactive behavior
03Enforces Vue 3 best practices for library-grade utility design
041,280 GitHub stars
05Normalizes reactive inputs using Vue's toValue() and toRef() utilities
06Distinguishes between read-only getters and two-way writable refs

ユースケース

01Creating flexible UI state logic that supports both static values and computed refs
02Developing reusable utility libraries for internal or open-source Vue projects
03Refactoring legacy Vue composables to support modern, getter-based reactivity patterns