Skip to main content

Getting started with Cervello

🤯 Simplest and reactive state manager for React (just 1.5kb)

Cervello is a reactive, tiny and fast state-management library for React

It's as easy as reassign a new value to the store properties.
It will make an immutable change to the store and notify all the components subscribed to that property or the entire store.

v5 (beta)

Cervello v5 is in beta, and it's not recommended for production yet.
For stable (latest) version docs, go to Legacy version docs

The v5 is a complete rewrite of internals with a new hooks API and new features.
Focused on performance, simplicity and flexibility.

Features

  • ⚛️ Truly reactive on store change (nested properties too 🚀!!)
  • ✅ Super simple and minimalistic API
  • 🚀 Batched updates and optimized re-renders
  • 🐨 Listen properties lazily
  • 🔒 Immutable changes
  • 🔑 Typescript support

Installation

pnpm add @cervello/react