← 返回 Skills 市场
yinhangfeng

vuact

作者 yinhf · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
208
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install vuact
功能描述
Vuact best practices and integration guide. A React↔Vue bridge / interop library that lets you use React components in Vue or Vue components in React with fu...
使用说明 (SKILL.md)

Vuact

Vuact is a React runtime compatibility layer for Vue 3. It enables seamless usage of the React component ecosystem inside Vue 3 projects, with two-way interoperability between Vue and React for components, events, reactivity, Context, Ref, and more.

Key value:

  • Seamlessly use React components in Vue apps
  • Support bidirectional migration: Vue ↔ React
  • Use Vue and React in the same application
  • Build cross-stack component libraries in a React-like way

Quick Start

For the full configuration and initialization flow, see setup-config.md.

Core Capabilities

1. Component Conversion

Vuact provides two core functions to convert components between Vue and React:

  • r2v (react-to-vue): Convert a React component into a Vue component
  • v2r (vue-to-react): Convert a Vue component into a React component

Examples:

2. Slots and Render Props

Vuact provides a flexible slots and render-props transformation mechanism:

  • On the Vue side, you can pass children, element props, or render props to React components via slots

  • On the React side, you can pass slots to Vue components via props prefixed with slot:

  • r2v Render Props and Slots

  • v2r Slots

3. Events and Props Interop

Vuact automatically transforms props and events between Vue and React:

  • Vue class → React className
  • Vue style (string or object) → React style (object)
  • React className → Vue class
  • React style (object; auto-add px for unitless values) → Vue style
  • Vue v-model update events → React onUpdate:xxx

Examples:

4. Context Interop

Vuact supports two-way Context passing between Vue and React:

  • On the Vue side, you can provide React Context to React components via provideContext
  • On the React side, you can provide Vue Context to Vue components via VueContextProvider
  • Context can pass through both frameworks

Examples:

5. Ref Interop

Vuact supports passing refs between Vue and React components:

  • On the Vue side, use ref to get a React component instance
  • On the React side, use ref to get a Vue component instance
  • For function components, expose methods via useImperativeHandle

Examples:

6. Use Vue Hooks in React Components

Vuact lets you use Vue reactivity directly inside React components:

  • Create a Vue reactive scope via useVueEffectScope
  • Use Vue hooks like ref, watch, computed, etc. within that scope
  • Combine the reactivity systems from both frameworks

Examples:

Compatibility and Limitations

Version Compatibility

  • React: mainly compatible with React 16–18; React 19 support is in progress
  • Vue: requires Vue >= 3.5
  • Build tools: ESM-only; requires a modern bundler

Known Limitations

Because Vuact is essentially based on Vue, some behaviors cannot fully match React:

  1. Concurrent rendering: Vue renders recursively, so React concurrent rendering cannot be replicated
  2. Commit phase: Vue mutates the DOM during recursive rendering; there is no explicit commit phase like React
    • useInsertionEffect timing differs from React
    • getSnapshotBeforeUpdate timing differs from React
  3. Event system: @vue/runtime-dom cannot fully match react-dom
    • react-dom's SyntheticEvent differs from standard web events
    • react-dom applies special handling for some native DOM elements (e.g. input, form, etc.)

Full Examples

Load the relevant reference docs to get complete example code and detailed explanations.

Vue → React (r2v)

React → Vue (v2r)

Configuration and Initialization

  • setup-config.md - Full configuration and initialization guide (more complete than the README)
安全使用建议
This is a documentation-only skill describing how to use a compatibility library that replaces React packages with 'vuact' at build time. Before adopting it: (1) review the actual vuact and vuact-dom package source (npm/GitHub) and maintainers, because the guide recommends low-level substitutions and a 'hack' to access Vue internals which can be fragile or introduce subtle runtime differences; (2) test in a small sandbox project—pnpm overrides and package aliasing change dependency resolution across your tree and can break other libraries; (3) check compatibility with your bundler and Vue/React versions; (4) there are no credential or network-exfiltration red flags in these docs, but always inspect third-party packages you install for unexpected code or remote calls.
功能分析
Type: OpenClaw Skill Name: vuact Version: 0.1.0 The 'vuact' skill bundle provides comprehensive documentation and code examples for a React-Vue interoperability library. It covers component conversion (r2v/v2r), event mapping, context sharing, and configuration steps for Vite and pnpm. While it suggests high-privilege project modifications like pnpm overrides and aliasing core libraries in 'references/setup-config.md', these actions are technically consistent with the stated goal of providing a cross-framework compatibility layer and show no signs of malicious intent or data exfiltration.
能力评估
Purpose & Capability
Name/description (vuact React↔Vue interop) match the included markdown examples and configuration notes; there are no requested environment variables, binaries, or config paths that don't belong to a frontend library integration guide.
Instruction Scope
SKILL.md and reference docs are purely developer-facing guidance: Vite aliases, pnpm overrides, imports, and example code. One implementation note mentions 'setup-scheduler' which 'retrieves Vue's internal flushJobs via a hack' and instructions to replace @vue/runtime-dom in pnpm overrides — both are expected for deep runtime shims but are fragile and deserve review before use.
Install Mechanism
This is instruction-only (no install spec). The guide recommends installing packages via pnpm (pnpm add vuact vuact-dom) and editing build config; that is proportionate for a JS library and does not involve arbitrary downloads or unusual install locations.
Credentials
No required environment variables, credentials, or config paths are declared or accessed by the docs. The recommended pnpm overrides and aliases affect dependency resolution in the project but are expected for replacing React with a compatibility layer.
Persistence & Privilege
Skill is not always-enabled, does not request persistent privileges, and has no instructions to modify agent/system skill configurations. It only contains docs and code examples, so it does not require elevated platform presence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install vuact
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /vuact 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of Vuact – a bridge for full two-way interoperability between React and Vue 3. - Seamlessly render React components inside Vue apps, and Vue components inside React apps. - Supports component rendering, event and prop interop, reactivity, slots/render props, Context, and refs across frameworks. - Allows use of Vue hooks within React components and vice versa. - Includes well-defined APIs for r2v (React-to-Vue) and v2r (Vue-to-React) conversions. - Documents compatibility (React 16–18, Vue 3.5+) and current limitations (e.g., concurrent rendering).
元数据
Slug vuact
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

vuact 是什么?

Vuact best practices and integration guide. A React↔Vue bridge / interop library that lets you use React components in Vue or Vue components in React with fu... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 208 次。

如何安装 vuact?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install vuact」即可一键安装,无需额外配置。

vuact 是免费的吗?

是的,vuact 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

vuact 支持哪些平台?

vuact 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 vuact?

由 yinhf(@yinhangfeng)开发并维护,当前版本 v0.1.0。

💬 留言讨论