Library
State ManagementPreact Signals
Fine-grained reactive state primitives built by the Preact team.
Native PreactActive
Native Preact
Built for Preact and does not require a React compatibility layer.
Package@preact/signals
npm install @preact/signalsimport { signal } from "@preact/signals"; const count = signal(0); export function Counter() { return <button onClick={() => count.value++}>Count: {count}</button>;}Known limitations
- Signals are intentionally small. You may still want a dedicated async-state or form library for specialized workflows.
Introduction
Preact Signals is the default recommendation for shared and local reactive state in modern Preact applications.
Preact configuration
No compatibility layer is required.
SSR notes
Signals work well during SSR because values can be read synchronously while rendering.
Islands notes
Signals are useful for island-style composition because isolated widgets can subscribe only to the values they need.