Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

616 B
Raw Blame
// Stringified-shape equality for `useAutoRefetch`'s `compare` option and other
// "skip the re-render when nothing changed" callers. JSON.stringify is the
// right tool when:
//   - the payload is small (poll snapshots, not large lists),
//   - the source is a server route that returns deterministic key order, and
//   - values are JSON-safe primitives + plain objects + arrays.
// For monotonic keys like `updatedAt`/`status` prefer a typed comparator —
// this is the fallback when no single key captures equality.
export const sameJsonShape = (prev, next) =>
  JSON.stringify(prev) === JSON.stringify(next);