Contection

React Context API extended with fine-grained subscriptions and computed values

Granular Subscriptions

Subscribe to specific store keys — components re-render only when subscribed data changes

Computed Values

Derive state with mutation functions for transformed or filtered data

SSR Compatible

Works with Next.js and other SSR frameworks out of the box

import { createStore, useStore } from "contection";

const AppStore = createStore({ count: 0, user: "Alex" });

function Counter() {
const { count } = useStore(AppStore, { keys: ["count"] });
return <span>{count}</span>;
}