Skip to main content

Data & state management

This section covers patterns for managing spreadsheet data in sync with your application state: from basic React useState to state management libraries.

Start here

  • State management basics - core patterns: controlled props, event callbacks, the ref escape hatch, and performance tips

State library guides

Key concept

The sheets prop is the single source of truth for all spreadsheet data. Pass an array of SheetData objects, and the wrapper diffs your data against the current widget state, applying only the changes. Use immutable updates (spread operators, functional setState updaters) so React can detect changes efficiently.