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

@sometic/store-immer

v2.0.2

Published

Optional Immer adapter for Sometic stores.

Downloads

1,156

Readme

@sometic/store-immer

Optional Immer adapter that adds draft-style produce updates to Sometic stores.

@sometic/store-immer exports createImmerStore, a thin wrapper around createStore from @sometic/store. You keep the same get, set, update, batch, subscribe, and dispose API, plus produce(updater) that runs Immer’s produce against the current state and commits the next immutable snapshot.

Sometic keeps the core store free of Immer so most apps never pay for draft machinery. This package exists for teams that prefer mutable-looking updates for nested objects while still shipping portable, framework-independent store behavior. It is an opt-in peer layer, not a second state system.

Out of the box you get typed ImmerUpdater drafts, full DisposableStore compatibility, and the same CreateStoreOptions (including custom equality) as the base store. There is no persistence or cross-tab logic here: compose with @sometic/store/persistent and related subpaths when you need those features on a plain store, or wrap only the in-memory slice that benefits from Immer.

In the ecosystem, install this only when Immer is already (or will be) a peer in your app. It sits beside @sometic/store and ultimately @sometic/core. Theme, auth, and forms do not require it. Product context: https://sometic.dev/guide/introduction.

Install

pnpm add @sometic/store-immer @sometic/store immer
npm install @sometic/store-immer @sometic/store immer
yarn add @sometic/store-immer @sometic/store immer

Usage

Draft updates with produce:

import { createImmerStore } from "@sometic/store-immer";

type TodoState = {
    items: Array<{ id: string; done: boolean }>;
};

const store = createImmerStore<TodoState>({
    items: [{ id: "1", done: false }],
});

store.produce((draft) => {
    const first = draft.items[0];
    if (first) {
        first.done = true;
    }
});

console.log(store.get().items[0]?.done);

Same subscription surface as @sometic/store:

import { createImmerStore } from "@sometic/store-immer";

const store = createImmerStore({ nested: { count: 0 } });

const unsubscribe = store.subscribe((state, previous) => {
    console.log(previous.nested.count, "->", state.nested.count);
});

store.produce((draft) => {
    draft.nested.count += 1;
});

unsubscribe();
store.dispose();

Peers / when not to use

Peer dependencies: @sometic/store (>=1.0.0) and immer (^10). Skip this package when immutable update spreads are enough, when bundle size is tight, or when you do not want Immer in the dependency graph. Prefer plain @sometic/store for most Sometic integrations.

Docs

License

MIT