Salesforce's Summer '26 release makes the @lwc/state module generally available for Lightning Web Components. It introduces a first-class reactive state management pattern using defineState, atoms, computed values, and setAtom — eliminating prop drilling, custom events, and pub/sub workarounds. State can be shared across component trees via fromContext. The release also ships built-in lightning namespace state managers for Salesforce data (records, objectInfo, layouts, related lists) built on Lightning Data Service and UI API. State managers are plain JS modules, making them unit-testable with Jest without mounting components. Two example projects are available on GitHub and StackBlitz.
Table of contents
Defining state in LWC with defineStateSharing state across a component tree with fromContextBuilt-in state managers for Salesforce dataSee state managers in actionMore resourcesAbout the Authors707 Impressions