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

solid-orbit

v0.1.6

Published

Solid bindings for Orbit.

Readme

solid-orbit

npm

Solid bindings for Orbit.

This package provides Solid a provider and hooks for Orbit. Most notably, this provides a useQuery hook which is a query transform listener, updating component props with records as they are changed.

Based heavily on developertown/react-orbitjs.

Installation

npm

npm install --save solid-orbit

yarn

yarn add solid-orbit

Example

Components that use hooks from this library must be children of OrbitProvider.

import { render, template, insert, createComponent } from 'solid-js/dom'
import MemorySource from '@orbit/memory'
import { Schema } from '@orbit/data'
import { OrbitProvider, OrbitRecord } from 'solid-orbit'

const schema = new Schema({
  models: {
    planet: {
      attributes: {
        name: { type: 'string' }
      }
    }
  }
})

const memory = new MemorySource({ schema });

const PlanetList: Component = () => {
  const recordsToPlanets = (records: OrbitRecord[]): string[] =>
    records.map(record => record?.attributes.name as string)
  const query = useQuery<{planets: string[]}>({
    planets: [
      q => q.findRecords("planet").sort("name"),
      recordsToPlanets
    ]
  })

  const actions = useUpdates({
    addPlanet: (name: string) => (t) => t.addRecord({
      type: 'planet', 
      id: name,
      attributes: {
        name
      }
    }),
    removePlanet: (name: string) => t => t.removeRecord({
      type: 'planet',
      id: name
    })
  })

  const [newPlanet, setNewPlanet] = createSignal<string>()

  return (
    <>
      <ul>
        <For each={query().planets}>
        {(planet) =>
          <li>{planet}</li>
          <button onClick={() => actions.removePlanet(planet)}>Delete</button>
        }
        </For>
      </ul>
      <input
        type="text"
        placeholder="enter planet name"
        value={newPlanet()}
        onInput={e => setNewPlanet(e.target.value)}
      />
      <button
        onClick={() => {
          actions.addPlanet(newPlanet())
          setNewPlanet('')
        }}
      >Add</button>
    </>
  )

}

const App: Component = () => (
  <OrbitProvider memory={memory}>
    <PlanetList>
  </OrbitProvider>
)

render(() => <App />, document.body)

API

OrbitProvider

Provider for using orbit hooks.

useQuery<T extends Record<string, unknown>>(subscribeToQueries: RecordsToProps<T>): (() => T)

Hook which takes an object where the fields are queries coupled with a transform function, and returns a signal object that updates when query results are changed by a transform.

useUpdates<T extends Record<string, (...args: any[]) => Promise<any>>>(transforms: TransformsToActions<T>): T

Hook which takes an object of functions that return transform builder functions, and maps them to an object of functions that return Promise<any>.