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/solid-compat

v0.11.3

Published

SolidJS-compatible API shim for Pyreon — write Solid-style code that runs on Pyreon's reactive engine

Readme

@pyreon/solid-compat

SolidJS-compatible API shim that runs on Pyreon's signal-based reactive engine. Migrate Solid code by swapping the import path.

Install

bun add @pyreon/solid-compat

Quick Start

// Replace:
// import { createSignal, createEffect } from "solid-js"
// With:
import { createSignal, createEffect } from "@pyreon/solid-compat"

function Counter() {
  const [count, setCount] = createSignal(0)
  createEffect(() => console.log("count:", count()))
  return <button onClick={() => setCount((c) => c + 1)}>{count}</button>
}

Derived State and Memos

import { createSignal, createMemo } from "@pyreon/solid-compat"

function PriceCalculator() {
  const [price, setPrice] = createSignal(100)
  const [quantity, setQuantity] = createSignal(1)
  const total = createMemo(() => price() * quantity())

  return (
    <div>
      <input
        type="number"
        value={price()}
        onInput={(e) => setPrice(Number(e.currentTarget.value))}
      />
      <input
        type="number"
        value={quantity()}
        onInput={(e) => setQuantity(Number(e.currentTarget.value))}
      />
      <p>Total: ${total()}</p>
    </div>
  )
}

Control Flow Components

import { createSignal } from "@pyreon/solid-compat"
import { Show, For } from "@pyreon/solid-compat"

function TodoList() {
  const [todos, setTodos] = createSignal([
    { id: 1, text: "Learn Pyreon", done: false },
    { id: 2, text: "Build app", done: false },
  ])
  const [showDone, setShowDone] = createSignal(false)

  return (
    <div>
      <button onClick={() => setShowDone((s) => !s)}>
        {showDone() ? "Hide" : "Show"} completed
      </button>
      <For each={todos()} by={(t) => t.id}>
        {(todo) => (
          <Show when={showDone() || !todo.done}>
            <p>{todo.text}</p>
          </Show>
        )}
      </For>
    </div>
  )
}

Context and Dependency Injection

import { createContext, useContext } from "@pyreon/solid-compat"
import { createSignal } from "@pyreon/solid-compat"

const CounterContext = createContext({ count: () => 0, increment: () => {} })

function CounterProvider(props: { children: any }) {
  const [count, setCount] = createSignal(0)
  const value = { count, increment: () => setCount((c) => c + 1) }
  return (
    <CounterContext.Provider value={value}>
      {props.children}
    </CounterContext.Provider>
  )
}

function Display() {
  const { count, increment } = useContext(CounterContext)
  return <button onClick={increment}>Clicks: {count()}</button>
}

Key Differences from SolidJS

  • Same mental model. Pyreon's reactivity is signal-based, just like Solid.
  • createEffect cleanup is supported. Pyreon's effect() supports both return-value cleanup and onCleanup() for registering cleanup functions imperatively.
  • lazy throws promises for Suspense. Works with <Suspense> boundaries.

API

Primitives

  • createSignal(initial) -- returns [getter, setter].
  • createEffect(fn) -- reactive side effect.
  • createRenderEffect(fn) -- alias for createEffect.
  • createComputed(fn) -- alias for createEffect.
  • createMemo(fn) -- returns a computed getter.
  • createRoot(fn) -- run in a new reactive scope with dispose.
  • on(deps, fn) -- explicit dependency tracking.

Utilities

  • batch(fn) -- coalesce multiple signal writes.
  • untrack(fn) -- read signals without tracking.
  • mergeProps(...sources) -- merge multiple props objects (supports symbol keys).
  • splitProps(props, ...keys) -- split props into groups (supports symbol keys).
  • children(fn) -- resolve reactive children.

Lifecycle

  • onMount(fn) -- run after component mounts.
  • onCleanup(fn) -- run on component unmount.

Context

  • createContext(defaultValue) -- create a context.
  • useContext(ctx) -- read a context value.

Ownership

  • getOwner() -- get the current reactive scope.
  • runWithOwner(owner, fn) -- run in a specific scope.

Reactivity

  • createSelector(source) -- O(1) equality selector.

Components

  • lazy(loader) -- dynamic import wrapper, throws promises for <Suspense>.
  • Show, Switch, Match, For -- control flow components.
  • Suspense, ErrorBoundary -- boundary components.