跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Create Adaptable Composable

技能 已验证 活跃

Create a library-grade Vue composable that accepts maybe-reactive inputs (MaybeRef / MaybeRefOrGetter) so callers can pass a plain value, ref, or getter. Normalize inputs with toValue()/toRef() inside reactive effects (watch/watchEffect) to keep behavior predictable and reactive. Use this skill when user asks for creating adaptable or reusable composables.

目的

To help developers create adaptable and reusable Vue composables that can seamlessly handle both reactive and non-reactive inputs, ensuring predictable behavior within reactive effects.

功能

  • Guides creation of adaptable Vue composables
  • Normalizes MaybeRef/MaybeRefOrGetter inputs
  • Utilizes toValue()/toRef() within reactive effects
  • Provides type utilities (MaybeRef, MaybeRefOrGetter)
  • Includes runnable code examples

使用场景

  • Creating reusable Vue composables with flexible input types
  • Developing composables that accept plain values, refs, or getters
  • Ensuring predictable reactivity when handling various input types
  • When user asks for creating adaptable or reusable composables

非目标

  • General Vue 3 development best practices (covered by other skills)
  • Specific state management patterns beyond input normalization
  • UI implementation details not related to composable input handling

安装

请先添加 Marketplace

/plugin marketplace add hyf0/vue-skills
/plugin install vue-skills@vue-skills

质量评分

已验证
100 /100
1 day ago 分析

信任信号

最近提交about 2 months ago
GitHub 所有者 hyf0 (opens in new tab)
星标2.4k
许可证MIT
状态
查看源代码

类似扩展

Vue Router Best Practices

100

Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.

技能
hyf0

Learn

100

捕获一条经验教训作为结构化的知识条目。当您发现一个不明显的 bug、解决方法或值得为未来会话保存的模式时使用。当用户说“记住这个”、“保存这个经验教训”或“这个值得注意”时使用。

技能
john-wilmes

Typescript Advanced Types

100

Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

技能
wshobson

Setup Tailwind Typescript

100

Configure Tailwind CSS with TypeScript in a Next.js or React project. Covers installation, configuration, custom theme extensions, component patterns, and type-safe styling utilities. Use when adding Tailwind CSS to an existing TypeScript project, customizing the Tailwind theme for a project's design system, setting up type-safe component styling patterns, or configuring Tailwind plugins and extensions.

技能
pjt222

Trader Regime

100

Detect current market regime using npx neural-trader — bull/bear/ranging/volatile classification with recommended strategy

技能
ruvnet

Aws Cdk Development

100

AWS Cloud Development Kit (CDK) 专家,用于使用 TypeScript/Python 构建云基础设施。在创建 CDK 堆栈、定义 CDK 构造、实现基础设施即代码,或当用户提及 CDK、CloudFormation、IaC、cdk synth、cdk deploy,或希望以编程方式定义 AWS 基础设施时使用。涵盖 CDK 应用结构、构造模式、堆栈组合和部署工作流。

技能
zxkane