[{"data":1,"prerenderedAt":802},["ShallowReactive",2],{"navigation":3,"-docs-hooks-use-memoized-fn":313,"-docs-hooks-use-memoized-fn-description":674,"use-memoized-fn-fn-description":695,"use-memoized-fn-return-description":704,"highlight-type-T":713,"highlight-type-PickFunction\u003CT>":738,"hook-changelog-use-memoized-fn":775,"mdc--tlqpn8-key":780},[4],{"title":5,"path":6,"stem":7,"children":8,"page":312},"Docs","/docs","docs",[9,32],{"title":10,"path":11,"stem":12,"children":13,"category":16,"description":16,"icon":31},"Getting Started","/docs/getting-started","docs/1.getting-started/1.index",[14,19,25],{"title":15,"path":11,"stem":12,"category":16,"description":17,"icon":18},"Introduction",null,"Welcome to the sse-hooks documentation.","i-lucide-house",{"title":20,"path":21,"stem":22,"category":16,"description":23,"icon":24},"Installation","/docs/getting-started/installation","docs/1.getting-started/2.installation","Get started with sse-hooks in your React or Next.js project.","i-lucide-download",{"title":26,"path":27,"stem":28,"category":16,"description":29,"icon":30},"Usage","/docs/getting-started/usage","docs/1.getting-started/3.usage","Learn how to integrate and configure sse-hooks in your application.","i-lucide-sliders","i-lucide-square-play",{"title":33,"category":16,"description":16,"icon":34,"path":35,"stem":36,"children":37,"page":312},"Hooks","i-lucide-square-function","/docs/hooks","docs/2.hooks",[38,44,50,56,62,67,72,77,83,89,95,101,107,112,117,124,129,134,140,145,150,155,160,165,170,175,180,185,190,195,199,204,209,213,218,223,228,233,238,243,248,253,258,263,268,273,278,283,288,292,297,302,307],{"title":39,"path":40,"stem":41,"category":42,"description":43},"useAudioRecorder","/docs/hooks/use-audio-recorder","docs/2.hooks/1.use-audio-recorder","sensors","A comprehensive hook for audio recording with real-time analysis using getUserMedia, MediaRecorder, and Web Audio APIs",{"title":45,"path":46,"stem":47,"category":48,"description":49},"useCountdown","/docs/hooks/use-countdown","docs/2.hooks/10.use-countdown","effect","Custom hook that manages countdown.",{"title":51,"path":52,"stem":53,"category":54,"description":55},"useCounter","/docs/hooks/use-counter","docs/2.hooks/11.use-counter","state","Custom hook that manages a counter with increment, decrement, reset, and setCount functionalities.",{"title":57,"path":58,"stem":59,"category":60,"description":61},"useDarkMode","/docs/hooks/use-dark-mode","docs/2.hooks/12.use-dark-mode","dom","Custom hook that returns the current state of the dark mode.",{"title":63,"path":64,"stem":65,"category":48,"description":66},"useDebounceCallback","/docs/hooks/use-debounce-callback","docs/2.hooks/13.use-debounce-callback","Custom hook that creates a debounced version of a callback function.",{"title":68,"path":69,"stem":70,"category":48,"description":71},"useDebounceValue","/docs/hooks/use-debounce-value","docs/2.hooks/14.use-debounce-value","Custom hook that returns a debounced version of the provided value, along with a function to update it.",{"title":73,"path":74,"stem":75,"category":60,"description":76},"useDocumentTitle","/docs/hooks/use-document-title","docs/2.hooks/15.use-document-title","Custom hook that sets the document title.",{"title":78,"path":79,"stem":80,"category":81,"description":82},"useEventCallback","/docs/hooks/use-event-callback","docs/2.hooks/16.use-event-callback","utilities","Custom hook that creates a memoized event callback.",{"title":84,"path":85,"stem":86,"category":87,"description":88},"useEventListener","/docs/hooks/use-event-listener","docs/2.hooks/17.use-event-listener","uncategorized","",{"title":90,"path":91,"stem":92,"category":60,"description":93,"badge":94},"useFavicon","/docs/hooks/use-favicon","docs/2.hooks/18.use-favicon","Custom hook that sets the document favicon.","NEW",{"title":96,"path":97,"stem":98,"category":99,"description":100},"useFetch","/docs/hooks/use-fetch","docs/2.hooks/19.use-fetch","network","Custom hook that provides a wrapper around the native `fetch API` to handle HTTP requests with state management, abort capability, and TypeScript support.",{"title":102,"path":103,"stem":104,"category":105,"description":106,"badge":94},"useAutoSave","/docs/hooks/use-auto-save","docs/2.hooks/2.use-auto-save","storage","A robust hook for auto-saving form data with debouncing, race-condition handling, and lifecycle safety.\nIt monitors the `data` state and triggers the `onSave` callback after a specified `delay` of inactivity. It also provides a smart `onChange` handler that adapts to both React Events and direct values.",{"title":108,"path":109,"stem":110,"category":60,"description":111},"useForkRef","/docs/hooks/use-fork-ref","docs/2.hooks/20.use-fork-ref","Merges refs into a single memoized callback ref or `null`.",{"title":113,"path":114,"stem":115,"category":42,"description":116},"useHover","/docs/hooks/use-hover","docs/2.hooks/21.use-hover","Custom hook that tracks whether a DOM element is being hovered over.",{"title":118,"path":119,"stem":120,"children":121,"category":105,"description":123},"useIndexedDB","/docs/hooks/use-indexed-db","docs/2.hooks/22.use-indexed-db",[122],{"title":118,"path":119,"stem":120,"category":105,"description":123},"Custom hook that provides an interface to the `IndexedDB API` for client-side storage of significant amounts of structured data.",{"title":125,"path":126,"stem":127,"category":87,"description":128},"useIntersectionObserver","/docs/hooks/use-intersection-observer","docs/2.hooks/23.use-intersection-observer","Custom hook that tracks the intersection of a DOM element with its containing element or the viewport using the `Intersection Observer API`.",{"title":130,"path":131,"stem":132,"category":48,"description":133},"useInterval","/docs/hooks/use-interval","docs/2.hooks/24.use-interval","Custom hook that creates an interval that invokes a callback function at a specified delay using the `setInterval API`.",{"title":135,"path":136,"stem":137,"category":138,"description":139},"useIsClient","/docs/hooks/use-is-client","docs/2.hooks/25.use-is-client","lifecycle","Custom hook that determines if the code is running on the client side (in the browser).",{"title":141,"path":142,"stem":143,"category":138,"description":144},"useIsMounted","/docs/hooks/use-is-mounted","docs/2.hooks/26.use-is-mounted","Custom hook that determines if the component is currently mounted.",{"title":146,"path":147,"stem":148,"category":81,"description":149,"badge":94},"useKbd","/docs/hooks/use-kbd","docs/2.hooks/27.use-kbd","Custom hook that detects the operating system (Mac vs. Windows/Linux) and provides a normalized map of keyboard keys (e.g., mapping \"Meta\" to \"Command\" on Mac and \"Ctrl\" on Windows).",{"title":151,"path":152,"stem":153,"category":42,"description":154,"badge":94},"useKey","/docs/hooks/use-key","docs/2.hooks/28.use-key","A powerful sensor hook for handling keyboard shortcuts, sequences, and modifiers.\nIt supports complex key combinations (`Ctrl+Shift+S`), Gmail-style sequences (`g then i`), and provides metadata for generating \"Keyboard Shortcut\" UI help modals.",{"title":156,"path":157,"stem":158,"category":105,"description":159},"useLocalStorage","/docs/hooks/use-local-storage","docs/2.hooks/29.use-local-storage","Custom hook that uses the `localStorage API` to persist state across page reloads.",{"title":161,"path":162,"stem":163,"category":54,"description":164},"useBoolean","/docs/hooks/use-boolean","docs/2.hooks/3.use-boolean","Custom hook that handles boolean state with useful utility functions.",{"title":166,"path":167,"stem":168,"category":54,"description":169},"useMap","/docs/hooks/use-map","docs/2.hooks/30.use-map","Custom hook that manages a key-value `Map` state with setter actions.",{"title":171,"path":172,"stem":173,"category":81,"description":174},"useMediaQuality","/docs/hooks/use-media-quality","docs/2.hooks/31.use-media-quality","Custom hook to manage video stream quality by applying constraints (resolution and frame rate) to a MediaStream track.",{"title":176,"path":177,"stem":178,"category":42,"description":179},"useMediaQuery","/docs/hooks/use-media-query","docs/2.hooks/32.use-media-query","Custom hook that tracks the state of a media query using the `Match Media API`.",{"title":181,"path":182,"stem":183,"category":42,"description":184},"useMediaSession","/docs/hooks/use-media-session","docs/2.hooks/33.use-media-session","Custom hook that interacts with the Media Session API. It allows you to customize media notifications and handle media control events (like play, pause, next track) from the system's notification area or lock screen.",{"title":186,"path":187,"stem":188,"category":81,"description":189,"badge":94},"useMemoizedFn","/docs/hooks/use-memoized-fn","docs/2.hooks/34.use-memoized-fn","A hook that returns a memoized version of a function. Unlike `useCallback`, the function identity remains stable across re-renders, but it always has access to the latest props and state without needing a dependency array. This is particularly useful for passing callbacks to optimized child components to prevent unnecessary re-renders while avoiding closure staleness.",{"title":191,"path":192,"stem":193,"category":99,"description":194},"useNetworkInformation","/docs/hooks/use-network-information","docs/2.hooks/35.use-network-information","Custom hook that tracks the device's network connection status and details (speed, type) using the Network Information API.",{"title":196,"path":197,"stem":198,"category":87,"description":88},"useReadLocalStorage","/docs/hooks/use-read-local-storage","docs/2.hooks/36.use-read-local-storage",{"title":200,"path":201,"stem":202,"category":42,"description":203},"useResizeObserver","/docs/hooks/use-resize-observer","docs/2.hooks/37.use-resize-observer","Custom hook that observes the size of an element using the `ResizeObserver API`.",{"title":205,"path":206,"stem":207,"category":54,"description":208},"useRoleGuard","/docs/hooks/use-role-guard","docs/2.hooks/38.use-role-guard","Custom hook for Role-Based Access Control (RBAC). Checks if a user has specific permissions and handles redirection for unauthorized access.",{"title":210,"path":211,"stem":212,"category":87,"description":88},"useScreen","/docs/hooks/use-screen","docs/2.hooks/39.use-screen",{"title":214,"path":215,"stem":216,"category":81,"description":217,"badge":94},"useCallbackRef","/docs/hooks/use-callback-ref","docs/2.hooks/4.use-callback-ref","A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a prop or avoid re-executing effects when passed as a dependency",{"title":219,"path":220,"stem":221,"category":42,"description":222},"useScreenShare","/docs/hooks/use-screen-share","docs/2.hooks/40.use-screen-share","Custom hook that captures the user's screen or specific application window. It handles permission errors, stream management, native stop events, and cleanup.",{"title":224,"path":225,"stem":226,"category":60,"description":227},"useScript","/docs/hooks/use-script","docs/2.hooks/41.use-script","Custom hook that dynamically loads scripts and tracking their loading status.",{"title":229,"path":230,"stem":231,"category":60,"description":232},"useScrollLock","/docs/hooks/use-scroll-lock","docs/2.hooks/42.use-scroll-lock","A custom hook that locks and unlocks scroll.",{"title":234,"path":235,"stem":236,"category":81,"description":237,"badge":94},"useSearchWithSuggestions","/docs/hooks/use-search-with-suggestions","docs/2.hooks/43.use-search-with-suggestions","A comprehensive hook for building \"Command Palette\" or \"Omnibar\" style search interfaces. * It provides \"Ghost Text\" autocomplete (like Google search), command scoping (like Slack's `/` commands), and keyboard support. It handles the complex logic of parsing input strings to separate commands from queries.",{"title":239,"path":240,"stem":241,"category":105,"description":242},"useSessionStorage","/docs/hooks/use-session-storage","docs/2.hooks/44.use-session-storage","Custom hook that uses the `sessionStorage API` to persist state across page reloads.",{"title":244,"path":245,"stem":246,"category":81,"description":247},"useSSR","/docs/hooks/use-ssr","docs/2.hooks/45.use-ssr","Custom hook that detects the current environment (Browser, Server, or Native) and capability support (Workers, EventListeners). useful for avoiding hydration mismatches.",{"title":249,"path":250,"stem":251,"category":54,"description":252},"useStep","/docs/hooks/use-step","docs/2.hooks/46.use-step","Custom hook that manages and navigates between steps in a multi-step process.",{"title":254,"path":255,"stem":256,"category":81,"description":257},"useSymbol","/docs/hooks/use-symbol","docs/2.hooks/47.use-symbol","Custom hook for managing ES6 Symbols. Provides utilities to create unique symbols, manage a registry of symbols, and access well-known symbols.",{"title":259,"path":260,"stem":261,"category":60,"description":262},"useTernaryDarkMode","/docs/hooks/use-ternary-dark-mode","docs/2.hooks/48.use-ternary-dark-mode","Custom hook that manages ternary (system, dark, light) dark mode with local storage support.",{"title":264,"path":265,"stem":266,"category":48,"description":267},"useTimeout","/docs/hooks/use-timeout","docs/2.hooks/49.use-timeout","Custom hook that handles timeouts in React components using the `setTimeout API`.",{"title":269,"path":270,"stem":271,"category":60,"description":272},"useClickAnyWhere","/docs/hooks/use-click-any-where","docs/2.hooks/5.use-click-any-where","Custom hook that handles click events anywhere on the document.",{"title":274,"path":275,"stem":276,"category":54,"description":277},"useToggle","/docs/hooks/use-toggle","docs/2.hooks/50.use-toggle","Custom hook that manages a boolean toggle state in React components.",{"title":279,"path":280,"stem":281,"category":138,"description":282},"useUnmount","/docs/hooks/use-unmount","docs/2.hooks/51.use-unmount","Custom hook that runs a cleanup function when the component is unmounted.",{"title":284,"path":285,"stem":286,"category":42,"description":287},"useUserMedia","/docs/hooks/use-user-media","docs/2.hooks/52.use-user-media","Custom hook that captures audio and video from the user's device. It handles permission errors, stream management, and cleanup automatically.",{"title":289,"path":290,"stem":291,"category":87,"description":88},"useWindowSize","/docs/hooks/use-window-size","docs/2.hooks/53.use-window-size",{"title":293,"path":294,"stem":295,"category":60,"description":296},"useClickAway","/docs/hooks/use-click-away","docs/2.hooks/6.use-click-away","Custom hook that triggers a callback when a user clicks outside the referenced element. It handles portal elements, scrollbar clicks, and touch interactions intelligently.",{"title":298,"path":299,"stem":300,"category":42,"description":301},"useConferenceSystem","/docs/hooks/use-conference-system","docs/2.hooks/7.use-conference-system","A comprehensive hook for managing video conferencing state, including camera access, screen sharing, network monitoring, and automatic media quality adjustment.",{"title":303,"path":304,"stem":305,"category":105,"description":306},"useCookie","/docs/hooks/use-cookie","docs/2.hooks/8.use-cookie","Custom hook that manages state synchronized with a browser `cookie`. It handles serialization, prefixes, updates across tabs, and custom event synchronization.",{"title":308,"path":309,"stem":310,"category":81,"description":311},"useCopyToClipboard","/docs/hooks/use-copy-to-clipboard","docs/2.hooks/9.use-copy-to-clipboard","Custom hook that copies text to the clipboard using the `Clipboard API`.",false,{"id":314,"title":186,"body":315,"category":81,"description":189,"extension":664,"links":665,"meta":670,"navigation":671,"path":187,"seo":672,"stem":188,"__hash__":673},"docs/docs/2.hooks/34.use-memoized-fn.md",{"type":316,"value":317,"toc":654},"minimark",[318,322,432,435,618,622,627,630,634,636,640,643,647,650],[319,320,20],"h2",{"id":321},"installation",[323,324,326,355,374,392,415],"code-group",{"sync":325},"pm",[327,328,333],"pre",{"className":329,"code":330,"filename":331,"language":332,"meta":88,"style":88},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npx sse-hooks add use-memoized-fn\n","npm","bash",[334,335,336],"code",{"__ignoreMap":88},[337,338,341,345,349,352],"span",{"class":339,"line":340},"line",1,[337,342,344],{"class":343},"sBMFI","npx",[337,346,348],{"class":347},"sfazB"," sse-hooks",[337,350,351],{"class":347}," add",[337,353,354],{"class":347}," use-memoized-fn\n",[327,356,359],{"className":329,"code":357,"filename":358,"language":332,"meta":88,"style":88},"yarn dlx sse-hooks add use-memoized-fn\n","yarn",[334,360,361],{"__ignoreMap":88},[337,362,363,365,368,370,372],{"class":339,"line":340},[337,364,358],{"class":343},[337,366,367],{"class":347}," dlx",[337,369,348],{"class":347},[337,371,351],{"class":347},[337,373,354],{"class":347},[327,375,378],{"className":329,"code":376,"filename":377,"language":332,"meta":88,"style":88},"pnpm dlx sse-hooks add use-memoized-fn\n","pnpm",[334,379,380],{"__ignoreMap":88},[337,381,382,384,386,388,390],{"class":339,"line":340},[337,383,377],{"class":343},[337,385,367],{"class":347},[337,387,348],{"class":347},[337,389,351],{"class":347},[337,391,354],{"class":347},[327,393,396],{"className":329,"code":394,"filename":395,"language":332,"meta":88,"style":88},"deno run -A npm:sse-hooks add use-memoized-fn\n","deno",[334,397,398],{"__ignoreMap":88},[337,399,400,402,405,408,411,413],{"class":339,"line":340},[337,401,395],{"class":343},[337,403,404],{"class":347}," run",[337,406,407],{"class":347}," -A",[337,409,410],{"class":347}," npm:sse-hooks",[337,412,351],{"class":347},[337,414,354],{"class":347},[327,416,419],{"className":329,"code":417,"filename":418,"language":332,"meta":88,"style":88},"bunx sse-hooks add use-memoized-fn\n","bun",[334,420,421],{"__ignoreMap":88},[337,422,423,426,428,430],{"class":339,"line":340},[337,424,425],{"class":343},"bunx",[337,427,348],{"class":347},[337,429,351],{"class":347},[337,431,354],{"class":347},[319,433,26],{"id":434},"usage",[327,436,441],{"className":437,"code":438,"filename":439,"language":440,"meta":88,"style":88},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { useMemoizedFn } from \"./{hooks file}\";\n\nconst [state, setState] = useState(0);\n// The identity of 'callback' never changes, but it always logs the latest 'state'\nconst callback = useMemoizedFn(() => {\n  console.log(\"Current state:\", state);\n});\nreturn \u003CExpensiveComponent onClick={callback} />;\n","example.ts","tsx",[334,442,443,475,482,522,529,553,584,594],{"__ignoreMap":88},[337,444,445,449,453,457,460,463,466,469,472],{"class":339,"line":340},[337,446,448],{"class":447},"s7zQu","import",[337,450,452],{"class":451},"sMK4o"," {",[337,454,456],{"class":455},"sTEyZ"," useMemoizedFn",[337,458,459],{"class":451}," }",[337,461,462],{"class":447}," from",[337,464,465],{"class":451}," \"",[337,467,468],{"class":347},"./{hooks file}",[337,470,471],{"class":451},"\"",[337,473,474],{"class":451},";\n",[337,476,478],{"class":339,"line":477},2,[337,479,481],{"emptyLinePlaceholder":480},true,"\n",[337,483,485,489,492,494,497,500,503,506,510,513,517,520],{"class":339,"line":484},3,[337,486,488],{"class":487},"spNyl","const",[337,490,491],{"class":451}," [",[337,493,54],{"class":455},[337,495,496],{"class":451},",",[337,498,499],{"class":455}," setState",[337,501,502],{"class":451},"]",[337,504,505],{"class":451}," =",[337,507,509],{"class":508},"s2Zo4"," useState",[337,511,512],{"class":455},"(",[337,514,516],{"class":515},"sbssI","0",[337,518,519],{"class":455},")",[337,521,474],{"class":451},[337,523,525],{"class":339,"line":524},4,[337,526,528],{"class":527},"sHwdD","// The identity of 'callback' never changes, but it always logs the latest 'state'\n",[337,530,532,534,537,540,542,544,547,550],{"class":339,"line":531},5,[337,533,488],{"class":487},[337,535,536],{"class":455}," callback ",[337,538,539],{"class":451},"=",[337,541,456],{"class":508},[337,543,512],{"class":455},[337,545,546],{"class":451},"()",[337,548,549],{"class":487}," =>",[337,551,552],{"class":451}," {\n",[337,554,556,559,562,565,568,570,573,575,577,580,582],{"class":339,"line":555},6,[337,557,558],{"class":455},"  console",[337,560,561],{"class":451},".",[337,563,564],{"class":508},"log",[337,566,512],{"class":567},"swJcz",[337,569,471],{"class":451},[337,571,572],{"class":347},"Current state:",[337,574,471],{"class":451},[337,576,496],{"class":451},[337,578,579],{"class":455}," state",[337,581,519],{"class":567},[337,583,474],{"class":451},[337,585,587,590,592],{"class":339,"line":586},7,[337,588,589],{"class":451},"}",[337,591,519],{"class":455},[337,593,474],{"class":451},[337,595,597,600,603,606,609,612,615],{"class":339,"line":596},8,[337,598,599],{"class":447},"return",[337,601,602],{"class":451}," \u003C",[337,604,605],{"class":343},"ExpensiveComponent",[337,607,608],{"class":487}," onClick",[337,610,611],{"class":451},"={",[337,613,614],{"class":455},"callback",[337,616,617],{"class":451},"} />;\n",[319,619,621],{"id":620},"api","API",[623,624,626],"h3",{"id":625},"parameters","Parameters",[628,629],"component-props",{},[623,631,633],{"id":632},"returns","Returns",[628,635],{"type":632},[623,637,639],{"id":638},"type-alias","Type Alias",[641,642],"component-types",{},[319,644,646],{"id":645},"changelog","Changelog",[648,649],"hooks-changelog",{},[651,652,653],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":88,"searchDepth":340,"depth":477,"links":655},[656,657,658,663],{"id":321,"depth":477,"text":20},{"id":434,"depth":477,"text":26},{"id":620,"depth":477,"text":621,"children":659},[660,661,662],{"id":625,"depth":484,"text":626},{"id":632,"depth":484,"text":633},{"id":638,"depth":484,"text":639},{"id":645,"depth":477,"text":646},"md",[666],{"label":667,"icon":668,"to":669},"GitHub","i-simple-icons-github","https://github.com/sseuniverse/sse-hooks/blob/main/packages/hooks/src/useMemoizedFn",{},{"badge":94},{"title":186,"description":189},"vUCtAa7yogBRN_I_BDKHjlDm7vctSNtvTmaBSxYp7b4",{"data":675,"body":676},{},{"type":677,"children":678},"root",[679],{"type":680,"tag":681,"props":682,"children":683},"element","p",{},[684,687,693],{"type":685,"value":686},"text","A hook that returns a memoized version of a function. Unlike ",{"type":680,"tag":334,"props":688,"children":690},{"className":689},[],[691],{"type":685,"value":692},"useCallback",{"type":685,"value":694},", the function identity remains stable across re-renders, but it always has access to the latest props and state without needing a dependency array. This is particularly useful for passing callbacks to optimized child components to prevent unnecessary re-renders while avoiding closure staleness.",{"data":696,"body":697},{},{"type":677,"children":698},[699],{"type":680,"tag":681,"props":700,"children":701},{},[702],{"type":685,"value":703},"The function to be memoized.",{"data":705,"body":706},{},{"type":677,"children":707},[708],{"type":680,"tag":681,"props":709,"children":710},{},[711],{"type":685,"value":712},"Hook return value",{"data":714,"body":716,"toc":736},{"title":88,"description":715},"T",{"type":677,"children":717},[718,731],{"type":680,"tag":681,"props":719,"children":720},{},[721],{"type":680,"tag":334,"props":722,"children":725},{"className":723,"language":724,"style":88},"language-ts-type shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","ts-type",[726],{"type":680,"tag":337,"props":727,"children":729},{"style":728},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[730],{"type":685,"value":715},{"type":680,"tag":651,"props":732,"children":733},{},[734],{"type":685,"value":735},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":88,"searchDepth":477,"depth":477,"links":737},[],{"data":739,"body":741,"toc":773},{"title":88,"description":740},"PickFunction\u003CT>",{"type":677,"children":742},[743,769],{"type":680,"tag":681,"props":744,"children":745},{},[746],{"type":680,"tag":334,"props":747,"children":748},{"className":723,"language":724,"style":88},[749,754,760,764],{"type":680,"tag":337,"props":750,"children":751},{"style":728},[752],{"type":685,"value":753},"PickFunction",{"type":680,"tag":337,"props":755,"children":757},{"style":756},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[758],{"type":685,"value":759},"\u003C",{"type":680,"tag":337,"props":761,"children":762},{"style":728},[763],{"type":685,"value":715},{"type":680,"tag":337,"props":765,"children":766},{"style":756},[767],{"type":685,"value":768},">",{"type":680,"tag":651,"props":770,"children":771},{},[772],{"type":685,"value":735},{"title":88,"searchDepth":477,"depth":477,"links":774},[],[776],{"sha":777,"date":778,"message":779},"e9d5f82a8765152a478720cf1f59cd6aa0dfecab","2026-02-16T11:35:53Z","feat: add useMemoizedFn hook for memoizing function identities across re-renders",{"data":781,"body":782},{},{"type":677,"children":783},[784],{"type":680,"tag":681,"props":785,"children":786},{},[787,800],{"type":680,"tag":788,"props":789,"children":793},"a",{"href":790,"rel":791},"https://github.com/sseuniverse/sse-hooks/commit/e9d5f82a8765152a478720cf1f59cd6aa0dfecab",[792],"nofollow",[794],{"type":680,"tag":334,"props":795,"children":797},{"className":796},[],[798],{"type":685,"value":799},"e9d5f",{"type":685,"value":801}," — feat: add useMemoizedFn hook for memoizing function identities across re-renders",1771401402438]