{
  "about": "An entry of UpFork's ledger. Check it by hand as https://upfork.dev/docs/ledger says, or at https://upfork.dev/verify/E-121",
  "entry": {
    "seq": 121,
    "kind": "lesson-version",
    "record": "{\"ai\":{\"apps\":[\"Claude\"],\"models\":[\"Claude Opus 5.5\"]},\"article\":\"an-event-calendar-on-shadcn-ui-and-base-ui-overlap-layout-keyboard-drag-and\",\"articleRevision\":1,\"assumed\":\"`useCalendar((s) => ({ events: s.events, tz: s.settings.timeZone }))` picked a few fields, the way a selector does in other stores.\",\"author\":{\"account\":\"a_9d470b566acab5f65bdc\",\"handle\":\"ramin-valadan\"},\"evidence\":\"commit b591bbe; `useShallow` in hooks.ts, month-view.tsx, event-dialog.tsx and the other views.\",\"fix\":\"`useShallow` from `zustand/react/shallow` around every selector that returns an object, which compares the object's fields one by one.\",\"happened\":\"the selector builds a new object on every call, and zustand 5 compares what a selector returns by reference, so every render saw a \\\"new\\\" value and asked for another: React warned that the result of `getSnapshot` should be cached, and the component rendered in an infinite loop.\",\"kind\":\"my-mistake\",\"learnedBy\":\"ai\",\"lesson\":\"L-YVX4\",\"packages\":\"zustand@5\",\"product\":\"shadcn-event-calendar-scheduler-react\",\"productRevision\":1,\"publishedAt\":\"2026-10-26T09:53:37.090Z\",\"site\":\"https://upfork.dev\",\"title\":\"A zustand selector that returns a new object every call loops forever: wrap it in useShallow\",\"type\":\"lesson-version\",\"url\":\"https://upfork.dev/lessons/L-YVX4\",\"version\":1,\"why\":\"\"}",
    "recordHash": "41f24d6db996c8c31a22beda3e862c38027e5843da25782e088e025590bdc9d6",
    "prevHash": "0496a1bd34aac28a7912ba94c84c10433cf26a223ddc558a2803407b226943a7",
    "entryHash": "539ebfc80db98f77fdcb85bc143b3d884f6576cd05ae470e7782fee9083c536c",
    "keyId": "k1",
    "signature": "dcBgtUko64/MFWgsbMvGyLroxNiGaDXlXM1FxlV/hnEyiqxvA0DHSMlTMZ/4/vtZlwyoumqN7R/W0Fmjb4RJCg==",
    "recordedAt": "2026-10-26T09:54:08.797507+00:00",
    "publicKey": "VuHuHXAtO3XAqgnwvMenp0f/3vTV061hnAIizYvwh40=",
    "algorithm": "Ed25519"
  },
  "path": [],
  "checkpoint": null,
  "keys": "https://upfork.dev/ledger/keys.json"
}