SolidJS

@atolljs/solidjs — Signal adapter — the sdk uses solid-js internally for its reactive core, so shared values are natively tracked.

Install

frontend
npm install @atolljs/core @atolljs/solidjs

Usage

App.tsxfrontend
import { createSharedValue, createTask } from '@atolljs/solidjs';
import { counterMemory } from './counter.memory';
import { counter } from './counter';

export function App() {
  const count = createSharedValue(counterMemory, 'count');
  const increment = createTask(counter.increment);

  return (
    <button onClick={() => increment.run(1)}>
      count: {count() ?? '…'}
    </button>
  );
}

Binding API

ExportSignatureWhat it does
createObservablecreateObservable(source: ObservableValue<T>): Accessor<T>Subscribe to any observable snapshot.
createSharedValuecreateSharedValue(memory, key, select?, options?): Accessor<T | undefined>Bind one shared-memory field to an Accessor; optional selector + equality.
createTaskcreateTask(task | asyncFn): { state: Accessor<TaskSnapshot>, run, runOnce }Bind an AsyncTask — or any async fn — to a signal and get its triggers.

Live demo

@atolljs/solidjssolid/ ↗

If the frame is blank, the examples aren't up — run npm run dev:all (dev servers) or npm run serve:all (built apps) from the repository root.

Notes

  • Subscriptions auto-dispose via onCleanup when the owner is destroyed.
  • Worker-hosted Solid trees (islands) live in the companion package @atolljs/solid-island — see the Islands page under this section.