Installation
React 19 and React DOM 19 are peer dependencies — install them if your project doesn't already have them:
Quick Start
This page builds a counter store and reads it from a functional component. For class components, see Class Components.
Class Components
Pinia doesn't need a separate story for this — Vue's Options API and Composition API are just two ways of writing a component, and Pinia works the same from either. React's split between function and class components is a bigger structural difference, so class-component support gets its own page here.