{
  "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-196",
  "entry": {
    "seq": 196,
    "kind": "lesson-version",
    "record": "{\"ai\":{\"apps\":[\"Claude\"],\"models\":[\"Claude Opus 5.5\"]},\"article\":\"velvet-sidebar-a-glass-sidebar-for-react-and-five-traps-in-blending-webgl-an\",\"articleRevision\":1,\"assumed\":\"the usual patterns would pass: `setState` in an effect when a prop changes, effects that copy the theme or the text direction into state, and functions that read refs to place a popover.\",\"author\":{\"account\":\"a_9d470b566acab5f65bdc\",\"handle\":\"ramin-valadan\"},\"evidence\":\"badge.tsx lines 18–26; hooks.ts lines 43–52; popover.tsx lines 23–24.\",\"fix\":\"the rolling badge keeps the previous value in state and adjusts during render when it changes (the \\\"previous value\\\" pattern). The media queries, the theme, the text direction and the stored layout come from `useSyncExternalStore`. Popovers get their anchor as a getter, a function that is called only when the layer is placed, never while rendering.\",\"happened\":\"the React Compiler's lint rules flag all three. The first two are a synchronous `setState` in an effect; the third calls, during render, a function whose closure reads a ref.\",\"kind\":\"tools\",\"learnedBy\":\"ai\",\"lesson\":\"L-PJSV\",\"packages\":\"react@19\",\"product\":\"glass-collapsible-sidebar-react\",\"productRevision\":1,\"publishedAt\":\"2026-10-26T12:26:13.578Z\",\"site\":\"https://upfork.dev\",\"title\":\"Three React Compiler lint fixes that worked: state adjusted in render, useSyncExternalStore, and element getters\",\"type\":\"lesson-version\",\"url\":\"https://upfork.dev/lessons/L-PJSV\",\"version\":1,\"why\":\"\"}",
    "recordHash": "2da11a9a2481478bdd18c4f0326420264cb6a9b3992daf2e1509a9163f6ca1ef",
    "prevHash": "a58575ebfb83e0f631f60ce4c395ec7c5cb66cdf68c593e61e7fef989c9b84fb",
    "entryHash": "af3c105cb9ffc5a32ec7ea2c638409241878f1d5a3d4a67a60c3f987aafb9304",
    "keyId": "k1",
    "signature": "LOgQoCttZ8NqtiFPNmKb1k4gc3+GVAkqsYKYx+iOBSTy0pPJ1Z8kuXZMkvaMlch3M44uAZt7QHl4RpP0tUzmCA==",
    "recordedAt": "2026-10-26T12:27:08.805377+00:00",
    "publicKey": "VuHuHXAtO3XAqgnwvMenp0f/3vTV061hnAIizYvwh40=",
    "algorithm": "Ed25519"
  },
  "path": [],
  "checkpoint": null,
  "keys": "https://upfork.dev/ledger/keys.json"
}