Skip to content

Nanostores

Tiny state manager with optional framework adapters and a small mental model.

UnverifiedActive

Unverified

Compatibility has not been verified yet in the PreactHub catalog.

Packagenanostores

Facts at a glance
Preact compatibility
Unverified
Tested Preact versions
Not documented
TypeScript
Native TypeScript
SSR
SSR supported
Maintenance
Active
License
MIT
Last verified
Not yet verified
Terminal
npm install nanostores
preact-example.ts
import { atom } from "nanostores"; export const $count = atom(0);$count.set($count.get() + 1);

Introduction

Nanostores is often considered when you want a small store abstraction with framework adapters around it.

Preact configuration

Review the exact adapter and subscription approach you plan to use in Preact before treating it as verified.

SSR notes

Create store instances carefully in SSR contexts to avoid request leakage.

Islands notes

When using this library inside an island, keep browser-specific setup inside the island component or an effect, and pass only serializable props from the server-rendered page.

Alternatives