jotai

vercel-labs/json-render · updated Apr 8, 2026

$npx skills add https://github.com/vercel-labs/json-render --skill jotai
0 commentsdiscussion
summary

Jotai adapter for json-render's StateStore interface. Wire a Jotai atom as the state backend for json-render.

skill.md

@json-render/jotai

Jotai adapter for json-render's StateStore interface. Wire a Jotai atom as the state backend for json-render.

Installation

npm install @json-render/jotai @json-render/core @json-render/react jotai

Usage

import { atom } from "jotai";
import { jotaiStateStore } from "@json-render/jotai";
import { StateProvider } from "@json-render/react";

// 1. Create an atom that holds the json-render state
const uiAtom = atom<Record<string, unknown>>({ count: 0 });

// 2. Create the json-render StateStore adapter
const store = jotaiStateStore({ atom: uiAtom });

// 3. Use it
<StateProvider store={store}>
  {/* json-render reads/writes go through Jotai */}
</StateProvider>

With a Shared Jotai Store

When your app already uses a Jotai <Provider> with a custom store, pass it so both json-render and your components share the same state:

import { atom, createStore } from "jotai";
import { Provider as JotaiProvider } from "jotai/react";
import { jotaiStateStore } from "@json-render/jotai";
import { StateProvider } from "@json-render/react";

const jStore = createStore();
const uiAtom = atom<Record<string, unknown>>({ count: 0 });

const store = jotaiStateStore({ atom: uiAtom, store: jStore });

<JotaiProvider store={jStore}>
  <StateProvider store={store}>
    {/* Both json-render and useAtom() see the same state */}
  </StateProvider>
</JotaiProvider>

API

jotaiStateStore(options)

Creates a StateStore backed by a Jotai atom.

Option Type Required Description
atom WritableAtom<StateModel, [StateModel], void> Yes A writable atom holding the state model
store Jotai Store No The Jotai store instance. Defaults to a new store. Pass your own to share state with <Provider>.

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.545 reviews
  • Olivia Shah· Dec 28, 2024

    jotai reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Nikhil Harris· Dec 28, 2024

    I recommend jotai for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Sofia Rao· Dec 4, 2024

    Solid pick for teams standardizing on skills: jotai is focused, and the summary matches what you get after install.

  • Rahul Santra· Nov 27, 2024

    Solid pick for teams standardizing on skills: jotai is focused, and the summary matches what you get after install.

  • Charlotte Sethi· Nov 19, 2024

    jotai has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • James Ghosh· Nov 19, 2024

    Useful defaults in jotai — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Kaira Rao· Nov 19, 2024

    jotai is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Pratham Ware· Oct 18, 2024

    jotai is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Liam Jackson· Oct 10, 2024

    jotai fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • James Mehta· Oct 10, 2024

    Registry listing for jotai matched our evaluation — installs cleanly and behaves as described in the markdown.

showing 1-10 of 45

1 / 5