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.12.10

Published

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

Downloads

5,657

Readme

@pyreon/vue-compat

Vue 3 Composition API shim that runs on Pyreon's signal-based reactive engine. Migrate Vue code by swapping the import path.

Install

bun add @pyreon/vue-compat

Quick Start

// Replace:
// import { ref, computed, watch } from "vue"
// With:
import { ref, computed, watch } from '@pyreon/vue-compat'

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

  watch(count, (newVal, oldVal) => {
    console.log(`count: ${oldVal} -> ${newVal}`)
  })

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

Reactive Objects

import { reactive, watchEffect } from '@pyreon/vue-compat'

function UserForm() {
  const form = reactive({ name: '', email: '' })

  watchEffect(() => {
    console.log('form changed:', form.name, form.email)
  })

  return (
    <div>
      <input
        value={form.name}
        onInput={(e) => (form.name = e.currentTarget.value)}
        placeholder="Name"
      />
      <input
        value={form.email}
        onInput={(e) => (form.email = e.currentTarget.value)}
        placeholder="Email"
      />
      <p>
        Hello, {form.name} ({form.email})
      </p>
    </div>
  )
}

Provide / Inject

import { ref, provide, inject, defineComponent } from '@pyreon/vue-compat'

const ThemeKey = Symbol('theme')

function ThemeProvider(props: { children: any }) {
  const theme = ref('light')
  provide(ThemeKey, theme)
  return (
    <div>
      <button onClick={() => (theme.value = theme.value === 'light' ? 'dark' : 'light')}>
        Toggle theme
      </button>
      {props.children}
    </div>
  )
}

function ThemedBox() {
  const theme = inject(ThemeKey, ref('light'))
  return <div class={`box-${theme.value}`}>Theme: {theme.value}</div>
}

createApp

import { createApp, ref } from '@pyreon/vue-compat'

function App() {
  const message = ref('Hello from Pyreon')
  return <h1>{message.value}</h1>
}

const app = createApp(App)
app.mount('#app')

Key Differences from Vue

  • No virtual DOM. Pyreon uses fine-grained reactivity -- no diffing, no re-renders.
  • Components run once (setup phase only).
  • reactive() uses Pyreon's store proxy with deep signal wrapping.
  • readonly() is strict -- setting any property (including symbols) throws an error.
  • provide / inject uses Pyreon's context system -- fully isolated per component tree.

API

Reactivity: Refs

  • ref(value) -- returns { value } with reactive .value.
  • shallowRef(value) -- shallow reactive ref (no deep tracking).
  • triggerRef(ref) -- force subscribers to re-run.
  • isRef(val) -- type guard.
  • unref(val) -- unwrap a ref or return value as-is.
  • toRef(obj, key) -- create a ref bound to an object property.
  • toRefs(obj) -- convert all properties to refs.

Reactivity: Computed

  • computed(fn) -- read-only computed ref.
  • computed({ get, set }) -- writable computed ref.

Reactivity: Objects

  • reactive(obj) -- deep reactive proxy (Pyreon store).
  • shallowReactive(obj) -- shallow reactive proxy.
  • readonly(obj) -- read-only proxy that throws on writes.
  • toRaw(proxy) -- unwrap to the original object.

Watchers

  • watch(source, callback, options?) -- watch a ref, getter, or reactive object. Supports immediate and deep.
  • watchEffect(fn) -- auto-tracking effect, returns stop handle.

Lifecycle Hooks

  • onMounted(fn) / onBeforeMount(fn)
  • onUnmounted(fn) / onBeforeUnmount(fn)
  • onUpdated(fn)

Dependency Injection

  • provide(key, value) -- provide a value to descendants.
  • inject(key, defaultValue?) -- inject a value from an ancestor.

Application

  • createApp(component, props?) -- create an app instance with .mount(el) and .unmount().
  • defineComponent(setup) -- wrapper for type inference (returns setup as-is).
  • nextTick() -- wait for the next microtask.

Utilities

  • h / Fragment -- JSX runtime.
  • batch(fn) -- coalesce multiple signal writes.