produce & reconcile in SolidJS

From the SolidJS cheat sheet ยท Stores ยท verified Jul 2026

produce & reconcile

Use produce for mutable-style updates and reconcile for replacing store data.

typescript
// Quick Reference
import { createStore, produce, reconcile } from "solid-js/store";

setState(produce(s => { s.user.name = "Bob"; }));
setState(reconcile(newData));
๐Ÿ’ก produce lets you write mutable-looking code that produces immutable updates
โšก reconcile diffs new data against the store to make minimal reactive updates
๐Ÿ“Œ Use reconcile when replacing store data from API responses for best performance
๐ŸŸข produce is imported from "solid-js/store", not from a separate package
storesproducereconcile

More SolidJS tasks

Back to the full SolidJS cheat sheet