npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pyreon/vue-compat

v0.25.1

Published

Vue 3-compatible Composition API shim for Pyreon — write Vue-style code that runs on Pyreon's reactive engine

Downloads

2,645

Readme

@pyreon/vue-compat

Vue 3 Composition API shim — write Vue-style code that runs on Pyreon's reactive engine.

@pyreon/vue-compat provides the Vue 3 Composition API surface (ref, shallowRef, computed, reactive, shallowReactive, readonly, shallowReadonly, toRef, toRefs, toRaw, toValue, unref, isRef, isReactive, isReadonly, isProxy, markRaw, triggerRef, watch, watchEffect, lifecycle hooks onMounted / onUnmounted / onUpdated / onBeforeMount / onBeforeUnmount, nextTick, provide / inject, defineComponent, defineAsyncComponent, createApp, effectScope / getCurrentScope / onScopeDispose, error/render-track hooks, <Teleport>, <KeepAlive>, <Transition>) all running on Pyreon's reactive engine. This is a runtime shim, not Vue — it covers what code imports, NOT the Single-File Component compiler. .vue files require a separate SFC compiler.

Install

bun add @pyreon/vue-compat

Quick start

import { ref, computed, watch, onMounted } from '@pyreon/vue-compat'

function Counter() {
  const count = ref(0)
  const doubled = computed(() => count.value * 2)

  watch(count, (next, prev) => {
    console.log(`count: ${prev} → ${next}`)
  })

  onMounted(() => {
    console.log('mounted')
  })

  return (
    <div>
      <p>Count: {count.value}, doubled: {doubled.value}</p>
      <button onClick={() => count.value++}>+1</button>
    </div>
  )
}

Subpath exports

| Subpath | Surface | | ------------------------------------ | --------------------------------------------------------------------------------------------- | | @pyreon/vue-compat | Full Composition API surface — see API table below | | @pyreon/vue-compat/jsx-runtime | JSX automatic runtime (jsx, jsxs, Fragment) | | @pyreon/vue-compat/jsx-dev-runtime | Dev variant — same runtime |

API surface

| Category | Exports | | ---------------- | --------------------------------------------------------------------------------------------- | | Refs | ref, shallowRef, triggerRef, isRef, unref, toValue, toRef, toRefs | | Computed | computed (getter form + writable { get, set } form) | | Reactive | reactive, shallowReactive, readonly, shallowReadonly, toRaw, markRaw, isReactive, isReadonly, isProxy | | Watchers | watch, watchEffect, WatchOptions | | Lifecycle | onMounted, onUnmounted, onUpdated, onBeforeMount, onBeforeUnmount, onErrorCaptured, onRenderTracked, onRenderTriggered | | Scheduling | nextTick | | DI | provide, inject | | Components | defineComponent, defineAsyncComponent, createApp(App, props?) | | Scope | effectScope, getCurrentScope, onScopeDispose | | Built-ins | Teleport, KeepAlive, Transition | | JSX | h, Fragment |

Drop-in compat mode

@pyreon/vite-plugin can alias every vue import to this package:

// vite.config.ts
import pyreon from '@pyreon/vite-plugin'
export default { plugins: [pyreon({ compat: 'vue' })] }

tsconfig.json:

{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "@pyreon/vue-compat"
  }
}

Scope

This is a runtime shim. It covers what code imports at runtime — the same boundary @pyreon/solid-compat draws around Solid's compiler.

  • ✅ Composition API — ref, computed, reactive, watch, lifecycle, provide / inject, effectScope
  • defineComponent (typed) + defineAsyncComponent
  • createApp(component, props) — mount via .mount(selector)
  • ✅ Built-in components — Teleport, KeepAlive, Transition
  • .vue Single-File Component compiler
  • <script setup> syntax (compiler construct)
  • ❌ Options API class-component lifecycle (data, methods, computed block, created, beforeDestroy, …)
  • ❌ Template directives (v-if, v-for, v-model) — use JSX equivalents

Components are plain functions returning JSX that run on Pyreon's reactive engine.

Gotchas

  • .value reads/writes work because Pyreon signals wrap a value getter/setter to match Vue's ref shape.
  • reactive(obj) returns a Proxy that delegates to Pyreon signals — mutating obj.x = 5 triggers subscribers as Vue does.
  • watch deps are tracked automatically for function sources. For an array of sources, the watcher fires when any one changes.
  • createApp(App).mount(selector) maps to Pyreon's mount() — returns an app instance with .unmount().
  • Lifecycle hooks fire ONCE per component instance (run-once model). Vue's render-driven re-fires (onUpdated) translate to per-subscription effects under the hood — the visible effect is the same for most use cases.

Documentation

Full docs: docs.pyreon.dev/docs/vue-compat (or docs/docs/vue-compat.md in this repo).

License

MIT