{"ast":null,"code":"import React from'react';import SingleFunctionExample from'./SingleFunctionExample';import AutoFetchExample from'./AutoFetchExample';import ErrorExample from'./ErrorExample';import OptimisticExample from'./OptimisticExample';import PatchExample from'./PatchExample';import RaceExample from'./RaceExample';import pkg from'use-request/package.json';import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";const Example=_ref=>{let{title,code,badge,children}=_ref;return/*#__PURE__*/_jsxs(\"div\",{className:\"example\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"example-header\",children:[/*#__PURE__*/_jsx(\"h3\",{children:title}),badge&&/*#__PURE__*/_jsx(\"span\",{className:\"badge\",children:badge})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"example-body\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"example-code\",children:/*#__PURE__*/_jsx(\"pre\",{dangerouslySetInnerHTML:{__html:code}})}),/*#__PURE__*/_jsxs(\"div\",{className:\"example-preview\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"example-preview-label\",children:\"Live preview\"}),children]})]})]});};const basicCode=\"<span class=\\\"kw\\\">const</span> { value, pending, execute } = <span class=\\\"fn\\\">useRequest</span>(\\n  (num) <span class=\\\"op\\\">=></span> <span class=\\\"fn\\\">wait</span>(<span class=\\\"num\\\">2</span>).<span class=\\\"fn\\\">then</span>(() <span class=\\\"op\\\">=></span> num)\\n)\\n\\n<span class=\\\"cm\\\">// call manually with arguments</span>\\n<span class=\\\"fn\\\">execute</span>(<span class=\\\"num\\\">42</span>)\";const autoFetchCode=\"<span class=\\\"kw\\\">const</span> [userId, setUserId] = <span class=\\\"fn\\\">useState</span>(<span class=\\\"num\\\">1</span>)\\n\\n<span class=\\\"cm\\\">// re-fetches automatically when userId changes</span>\\n<span class=\\\"kw\\\">const</span> { value: user, pending } = <span class=\\\"fn\\\">useRequest</span>(\\n  api.<span class=\\\"prop\\\">getUser</span>,\\n  [userId]  <span class=\\\"cm\\\">// deps array</span>\\n)\";const errorCode=\"<span class=\\\"kw\\\">const</span> { value, error, idle, pending,\\n  completed, failed, execute, reset }\\n  = <span class=\\\"fn\\\">useRequest</span>(riskyCall)\\n\\n<span class=\\\"cm\\\">// all 4 states available as booleans</span>\\nidle     <span class=\\\"cm\\\">// before first call</span>\\npending  <span class=\\\"cm\\\">// in flight</span>\\ncompleted<span class=\\\"cm\\\">// resolved</span>\\nfailed   <span class=\\\"cm\\\">// rejected</span>\\n\\n<span class=\\\"fn\\\">reset</span>()  <span class=\\\"cm\\\">// back to idle, clears value/error</span>\";const optimisticCode=\"<span class=\\\"kw\\\">const</span> { value, execute } = <span class=\\\"fn\\\">useRequest</span>(\\n  (liked) <span class=\\\"op\\\">=></span> api.<span class=\\\"fn\\\">toggleLike</span>(liked),\\n  {\\n    <span class=\\\"prop\\\">optimisticPatch</span>: ([liked]) <span class=\\\"op\\\">=></span> ({\\n      liked,\\n      count: prev.<span class=\\\"prop\\\">count</span> + (liked ? <span class=\\\"num\\\">1</span> : <span class=\\\"num\\\">-1</span>)\\n    })\\n  }\\n)\\n\\n<span class=\\\"cm\\\">// UI updates instantly, syncs in background</span>\\n<span class=\\\"fn\\\">execute</span>(<span class=\\\"kw\\\">true</span>)\";const patchCode=\"<span class=\\\"kw\\\">const</span> { value: todos, patchValue, resetPatch, patched }\\n  = <span class=\\\"fn\\\">useRequest</span>(api.<span class=\\\"prop\\\">getTodos</span>, [])\\n\\n<span class=\\\"cm\\\">// optimistically add item</span>\\n<span class=\\\"fn\\\">patchValue</span>([...todos, newItem])\\n\\n<span class=\\\"cm\\\">// on failure, revert to server state</span>\\n<span class=\\\"fn\\\">resetPatch</span>()\\n\\npatched <span class=\\\"cm\\\">// false | 'manual' | 'auto'</span>\";const raceCode=\"<span class=\\\"kw\\\">const</span> [query, setQuery] = <span class=\\\"fn\\\">useState</span>(<span class=\\\"str\\\">''</span>)\\n\\n<span class=\\\"cm\\\">// fires on every keystroke, but stale</span>\\n<span class=\\\"cm\\\">// responses are automatically discarded</span>\\n<span class=\\\"kw\\\">const</span> { value: results } = <span class=\\\"fn\\\">useRequest</span>(\\n  (q) <span class=\\\"op\\\">=></span> q ? api.<span class=\\\"fn\\\">search</span>(q) : [],\\n  [query]\\n)\";const pkgManagers=[{id:'npm',cmd:'npm install use-request'},{id:'yarn',cmd:'yarn add use-request'},{id:'pnpm',cmd:'pnpm add use-request'}];const InstallCmd=()=>{const[active,setActive]=React.useState(0);const[copied,setCopied]=React.useState(false);const{cmd}=pkgManagers[active];const handleCopy=()=>{var _navigator$clipboard;(_navigator$clipboard=navigator.clipboard)===null||_navigator$clipboard===void 0?void 0:_navigator$clipboard.writeText(cmd);setCopied(true);setTimeout(()=>setCopied(false),1500);};return/*#__PURE__*/_jsxs(\"div\",{className:\"install-wrapper\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"install-tabs\",children:pkgManagers.map((pm,i)=>/*#__PURE__*/_jsx(\"button\",{className:\"install-tab\".concat(i===active?' active':''),onClick:()=>setActive(i),children:pm.id},pm.id))}),/*#__PURE__*/_jsxs(\"div\",{className:\"install-cmd\".concat(copied?' copied':''),onClick:handleCopy,title:\"Click to copy\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"dollar\",children:\"$\"}),cmd,/*#__PURE__*/_jsx(\"span\",{className:\"copy-hint\",children:copied?'copied!':'copy'})]})]});};const App=()=>/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsxs(\"header\",{className:\"hero\",children:[/*#__PURE__*/_jsx(\"img\",{src:process.env.PUBLIC_URL+'/logo.png',alt:\"use-request\",className:\"hero-logo\"}),/*#__PURE__*/_jsxs(\"h1\",{children:[/*#__PURE__*/_jsx(\"span\",{children:\"use-request\"}),\" \",/*#__PURE__*/_jsxs(\"span\",{className:\"version\",children:[\"v\",pkg.version]})]}),/*#__PURE__*/_jsx(\"p\",{className:\"tagline\",children:\"Async state management for React. Simple, typed, powerful.\"}),/*#__PURE__*/_jsx(InstallCmd,{}),/*#__PURE__*/_jsxs(\"div\",{className:\"hero-links\",children:[/*#__PURE__*/_jsx(\"a\",{href:\"https://github.com/termosa/use-request\",children:\"GitHub\"}),/*#__PURE__*/_jsx(\"a\",{href:\"https://www.npmjs.com/package/use-request\",children:\"npm\"})]})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"features\",children:[/*#__PURE__*/_jsxs(\"div\",{className:\"feature-card\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"icon\",children:\"~1KB\"}),/*#__PURE__*/_jsx(\"h3\",{children:\"Lightweight\"}),/*#__PURE__*/_jsx(\"p\",{children:\"Zero dependencies. Tiny gzipped bundle that won't bloat your app.\"})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"feature-card\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"icon\",children:\"TS\"}),/*#__PURE__*/_jsx(\"h3\",{children:\"TypeScript\"}),/*#__PURE__*/_jsx(\"p\",{children:\"Full type inference for values, errors, and arguments out of the box.\"})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"feature-card\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"icon\",children:\">_\"}),/*#__PURE__*/_jsx(\"h3\",{children:\"Race-safe\"}),/*#__PURE__*/_jsx(\"p\",{children:\"Stale responses are automatically discarded. Only the latest result wins.\"})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"feature-card\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"icon\",children:\"++\"}),/*#__PURE__*/_jsx(\"h3\",{children:\"Optimistic Updates\"}),/*#__PURE__*/_jsx(\"p\",{children:\"Instant UI feedback with optimisticPatch. Rolls back automatically on failure.\"})]})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"section\",children:[/*#__PURE__*/_jsx(\"h2\",{className:\"section-title\",children:\"In action\"}),/*#__PURE__*/_jsx(Example,{title:\"Manual execution\",code:basicCode,children:/*#__PURE__*/_jsx(SingleFunctionExample,{})}),/*#__PURE__*/_jsx(Example,{title:\"Reactive fetching\",code:autoFetchCode,children:/*#__PURE__*/_jsx(AutoFetchExample,{})}),/*#__PURE__*/_jsx(Example,{title:\"Error states\",code:errorCode,children:/*#__PURE__*/_jsx(ErrorExample,{})}),/*#__PURE__*/_jsx(Example,{title:\"Optimistic UI\",code:optimisticCode,children:/*#__PURE__*/_jsx(OptimisticExample,{})}),/*#__PURE__*/_jsx(Example,{title:\"Patch & rollback\",code:patchCode,children:/*#__PURE__*/_jsx(PatchExample,{})}),/*#__PURE__*/_jsx(Example,{title:\"Race-safe search\",code:raceCode,children:/*#__PURE__*/_jsx(RaceExample,{})})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"section\",children:[/*#__PURE__*/_jsx(\"h2\",{className:\"section-title\",children:\"Arguments\"}),/*#__PURE__*/_jsx(\"div\",{className:\"api-ref\",children:/*#__PURE__*/_jsxs(\"table\",{children:[/*#__PURE__*/_jsx(\"thead\",{children:/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"th\",{children:\"Argument\"}),/*#__PURE__*/_jsx(\"th\",{children:\"Type\"}),/*#__PURE__*/_jsx(\"th\",{children:\"Description\"})]})}),/*#__PURE__*/_jsxs(\"tbody\",{children:[/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"request\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"(...args) => Promise<T> | T\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Async or sync function to execute\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"options\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"T[] | Options | null\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Deps array, options object, or null\"})]}),/*#__PURE__*/_jsx(\"tr\",{className:\"api-group\",children:/*#__PURE__*/_jsx(\"td\",{colSpan:3,children:\"Options object\"})}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"deps\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"T[] | null\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Dependencies array \\u2014 triggers auto-execution when values change\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"optimisticPatch\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"T | ((args) => T)\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Value to set immediately on execute, before real response\"})]})]})]})})]}),/*#__PURE__*/_jsxs(\"div\",{className:\"section\",children:[/*#__PURE__*/_jsx(\"h2\",{className:\"section-title\",children:\"Surface\"}),/*#__PURE__*/_jsxs(\"div\",{className:\"api-ref\",children:[/*#__PURE__*/_jsxs(\"table\",{children:[/*#__PURE__*/_jsx(\"thead\",{children:/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"th\",{children:\"Property\"}),/*#__PURE__*/_jsx(\"th\",{children:\"Type\"}),/*#__PURE__*/_jsx(\"th\",{children:\"Description\"})]})}),/*#__PURE__*/_jsxs(\"tbody\",{children:[/*#__PURE__*/_jsx(\"tr\",{className:\"api-group\",children:/*#__PURE__*/_jsx(\"td\",{colSpan:3,children:\"State\"})}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"value\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"T | undefined\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Resolved value, persisted across re-executions\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"error\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"E | undefined\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Rejection reason\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"idle\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"boolean\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"No request has been made yet\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"pending\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"boolean\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Request is in flight\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"completed\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"boolean\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Last request resolved successfully\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"failed\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"boolean\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Last request was rejected\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"status\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"UseRequestStatus\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"'idle' | 'pending' | 'completed' | 'failed'\"})]}),/*#__PURE__*/_jsx(\"tr\",{className:\"api-group\",children:/*#__PURE__*/_jsx(\"td\",{colSpan:3,children:\"Actions\"})}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"method\",children:\"execute\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"method\",children:\"(...args) => Promise\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Trigger the request manually\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"method\",children:\"reset\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"method\",children:\"() => void\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Reset to idle state, cancel pending requests\"})]}),/*#__PURE__*/_jsx(\"tr\",{className:\"api-group\",children:/*#__PURE__*/_jsx(\"td\",{colSpan:3,children:\"Patching\"})}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"patched\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"false | 'manual' | 'auto'\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Whether current state is patched\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"method\",children:\"patch\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"method\",children:\"(input) => void\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Manually patch value and/or error\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"method\",children:\"patchValue\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"method\",children:\"(value) => void\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Shorthand to patch just the value\"})]}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"method\",children:\"resetPatch\"})}),/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"method\",children:\"() => void\"})}),/*#__PURE__*/_jsx(\"td\",{className:\"desc\",children:\"Revert to last real server response\"})]})]})]}),/*#__PURE__*/_jsx(\"table\",{children:/*#__PURE__*/_jsxs(\"tbody\",{children:[/*#__PURE__*/_jsx(\"tr\",{className:\"api-group\",children:/*#__PURE__*/_jsx(\"td\",{colSpan:3,children:\"Constants\"})}),/*#__PURE__*/_jsxs(\"tr\",{children:[/*#__PURE__*/_jsx(\"td\",{children:/*#__PURE__*/_jsx(\"code\",{className:\"api-enum-name\",children:\"UseRequestStatus\"})}),/*#__PURE__*/_jsxs(\"td\",{colSpan:2,children:[/*#__PURE__*/_jsxs(\"code\",{className:\"api-enum-import\",children:[\"import \",'{',\" UseRequestStatus \",'}',\" from 'use-request'\"]}),/*#__PURE__*/_jsxs(\"div\",{className:\"api-enum-values\",children:[/*#__PURE__*/_jsx(\"span\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"UseRequestStatus.Idle\"})}),/*#__PURE__*/_jsx(\"span\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"UseRequestStatus.Pending\"})}),/*#__PURE__*/_jsx(\"span\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"UseRequestStatus.Completed\"})}),/*#__PURE__*/_jsx(\"span\",{children:/*#__PURE__*/_jsx(\"code\",{children:\"UseRequestStatus.Failed\"})})]})]})]})]})})]})]}),/*#__PURE__*/_jsxs(\"footer\",{className:\"footer\",children:[\"MIT License \\xB7 \",/*#__PURE__*/_jsx(\"a\",{href:\"https://github.com/termosa/use-request\",children:\"GitHub\"}),\" \\xB7 \",/*#__PURE__*/_jsx(\"a\",{href:\"https://www.npmjs.com/package/use-request\",children:\"npm\"})]})]});export default App;","map":{"version":3,"names":["React","SingleFunctionExample","AutoFetchExample","ErrorExample","OptimisticExample","PatchExample","RaceExample","pkg","jsx","_jsx","jsxs","_jsxs","Example","_ref","title","code","badge","children","className","dangerouslySetInnerHTML","__html","basicCode","autoFetchCode","errorCode","optimisticCode","patchCode","raceCode","pkgManagers","id","cmd","InstallCmd","active","setActive","useState","copied","setCopied","handleCopy","_navigator$clipboard","navigator","clipboard","writeText","setTimeout","map","pm","i","concat","onClick","App","src","process","env","PUBLIC_URL","alt","version","href","colSpan"],"sources":["/root/.openclaw/workspace/projects/termosa-use-request/example/src/App.js"],"sourcesContent":["import React from 'react'\nimport SingleFunctionExample from './SingleFunctionExample'\nimport AutoFetchExample from './AutoFetchExample'\nimport ErrorExample from './ErrorExample'\nimport OptimisticExample from './OptimisticExample'\nimport PatchExample from './PatchExample'\nimport RaceExample from './RaceExample'\nimport pkg from 'use-request/package.json'\n\nconst Example = ({ title, code, badge, children }) => (\n  <div className=\"example\">\n    <div className=\"example-header\">\n      <h3>{title}</h3>\n      {badge && <span className=\"badge\">{badge}</span>}\n    </div>\n    <div className=\"example-body\">\n      <div className=\"example-code\">\n        <pre dangerouslySetInnerHTML={{ __html: code }} />\n      </div>\n      <div className=\"example-preview\">\n        <div className=\"example-preview-label\">Live preview</div>\n        {children}\n      </div>\n    </div>\n  </div>\n)\n\nconst basicCode = `<span class=\"kw\">const</span> { value, pending, execute } = <span class=\"fn\">useRequest</span>(\n  (num) <span class=\"op\">=></span> <span class=\"fn\">wait</span>(<span class=\"num\">2</span>).<span class=\"fn\">then</span>(() <span class=\"op\">=></span> num)\n)\n\n<span class=\"cm\">// call manually with arguments</span>\n<span class=\"fn\">execute</span>(<span class=\"num\">42</span>)`\n\nconst autoFetchCode = `<span class=\"kw\">const</span> [userId, setUserId] = <span class=\"fn\">useState</span>(<span class=\"num\">1</span>)\n\n<span class=\"cm\">// re-fetches automatically when userId changes</span>\n<span class=\"kw\">const</span> { value: user, pending } = <span class=\"fn\">useRequest</span>(\n  api.<span class=\"prop\">getUser</span>,\n  [userId]  <span class=\"cm\">// deps array</span>\n)`\n\nconst errorCode = `<span class=\"kw\">const</span> { value, error, idle, pending,\n  completed, failed, execute, reset }\n  = <span class=\"fn\">useRequest</span>(riskyCall)\n\n<span class=\"cm\">// all 4 states available as booleans</span>\nidle     <span class=\"cm\">// before first call</span>\npending  <span class=\"cm\">// in flight</span>\ncompleted<span class=\"cm\">// resolved</span>\nfailed   <span class=\"cm\">// rejected</span>\n\n<span class=\"fn\">reset</span>()  <span class=\"cm\">// back to idle, clears value/error</span>`\n\nconst optimisticCode = `<span class=\"kw\">const</span> { value, execute } = <span class=\"fn\">useRequest</span>(\n  (liked) <span class=\"op\">=></span> api.<span class=\"fn\">toggleLike</span>(liked),\n  {\n    <span class=\"prop\">optimisticPatch</span>: ([liked]) <span class=\"op\">=></span> ({\n      liked,\n      count: prev.<span class=\"prop\">count</span> + (liked ? <span class=\"num\">1</span> : <span class=\"num\">-1</span>)\n    })\n  }\n)\n\n<span class=\"cm\">// UI updates instantly, syncs in background</span>\n<span class=\"fn\">execute</span>(<span class=\"kw\">true</span>)`\n\n\nconst patchCode = `<span class=\"kw\">const</span> { value: todos, patchValue, resetPatch, patched }\n  = <span class=\"fn\">useRequest</span>(api.<span class=\"prop\">getTodos</span>, [])\n\n<span class=\"cm\">// optimistically add item</span>\n<span class=\"fn\">patchValue</span>([...todos, newItem])\n\n<span class=\"cm\">// on failure, revert to server state</span>\n<span class=\"fn\">resetPatch</span>()\n\npatched <span class=\"cm\">// false | 'manual' | 'auto'</span>`\n\nconst raceCode = `<span class=\"kw\">const</span> [query, setQuery] = <span class=\"fn\">useState</span>(<span class=\"str\">''</span>)\n\n<span class=\"cm\">// fires on every keystroke, but stale</span>\n<span class=\"cm\">// responses are automatically discarded</span>\n<span class=\"kw\">const</span> { value: results } = <span class=\"fn\">useRequest</span>(\n  (q) <span class=\"op\">=></span> q ? api.<span class=\"fn\">search</span>(q) : [],\n  [query]\n)`\n\nconst pkgManagers = [\n  { id: 'npm', cmd: 'npm install use-request' },\n  { id: 'yarn', cmd: 'yarn add use-request' },\n  { id: 'pnpm', cmd: 'pnpm add use-request' },\n]\n\nconst InstallCmd = () => {\n  const [active, setActive] = React.useState(0)\n  const [copied, setCopied] = React.useState(false)\n  const { cmd } = pkgManagers[active]\n\n  const handleCopy = () => {\n    navigator.clipboard?.writeText(cmd)\n    setCopied(true)\n    setTimeout(() => setCopied(false), 1500)\n  }\n\n  return (\n    <div className=\"install-wrapper\">\n      <div className=\"install-tabs\">\n        {pkgManagers.map((pm, i) => (\n          <button\n            key={pm.id}\n            className={`install-tab${i === active ? ' active' : ''}`}\n            onClick={() => setActive(i)}\n          >\n            {pm.id}\n          </button>\n        ))}\n      </div>\n      <div\n        className={`install-cmd${copied ? ' copied' : ''}`}\n        onClick={handleCopy}\n        title=\"Click to copy\"\n      >\n        <span className=\"dollar\">$</span>\n        {cmd}\n        <span className=\"copy-hint\">{copied ? 'copied!' : 'copy'}</span>\n      </div>\n    </div>\n  )\n}\n\nconst App = () => (\n  <div>\n    {/* Hero */}\n    <header className=\"hero\">\n      <img src={process.env.PUBLIC_URL + '/logo.png'} alt=\"use-request\" className=\"hero-logo\" />\n      <h1><span>use-request</span> <span className=\"version\">v{pkg.version}</span></h1>\n      <p className=\"tagline\">Async state management for React. Simple, typed, powerful.</p>\n      <InstallCmd />\n      <div className=\"hero-links\">\n        <a href=\"https://github.com/termosa/use-request\">GitHub</a>\n        <a href=\"https://www.npmjs.com/package/use-request\">npm</a>\n      </div>\n    </header>\n\n    {/* Features */}\n    <div className=\"features\">\n      <div className=\"feature-card\">\n        <div className=\"icon\">~1KB</div>\n        <h3>Lightweight</h3>\n        <p>Zero dependencies. Tiny gzipped bundle that won't bloat your app.</p>\n      </div>\n      <div className=\"feature-card\">\n        <div className=\"icon\">TS</div>\n        <h3>TypeScript</h3>\n        <p>Full type inference for values, errors, and arguments out of the box.</p>\n      </div>\n      <div className=\"feature-card\">\n        <div className=\"icon\">&gt;_</div>\n        <h3>Race-safe</h3>\n        <p>Stale responses are automatically discarded. Only the latest result wins.</p>\n      </div>\n      <div className=\"feature-card\">\n        <div className=\"icon\">++</div>\n        <h3>Optimistic Updates</h3>\n        <p>Instant UI feedback with optimisticPatch. Rolls back automatically on failure.</p>\n      </div>\n    </div>\n\n    {/* Examples */}\n    <div className=\"section\">\n      <h2 className=\"section-title\">In action</h2>\n\n      <Example title=\"Manual execution\" code={basicCode}>\n        <SingleFunctionExample />\n      </Example>\n\n      <Example title=\"Reactive fetching\" code={autoFetchCode}>\n        <AutoFetchExample />\n      </Example>\n\n      <Example title=\"Error states\" code={errorCode}>\n        <ErrorExample />\n      </Example>\n\n      <Example title=\"Optimistic UI\" code={optimisticCode}>\n        <OptimisticExample />\n      </Example>\n\n      <Example title=\"Patch & rollback\" code={patchCode}>\n        <PatchExample />\n      </Example>\n\n      <Example title=\"Race-safe search\" code={raceCode}>\n        <RaceExample />\n      </Example>\n    </div>\n\n    {/* Arguments */}\n    <div className=\"section\">\n      <h2 className=\"section-title\">Arguments</h2>\n      <div className=\"api-ref\">\n        <table>\n          <thead>\n            <tr>\n              <th>Argument</th>\n              <th>Type</th>\n              <th>Description</th>\n            </tr>\n          </thead>\n          <tbody>\n            <tr>\n              <td><code>request</code></td>\n              <td><code>(...args) =&gt; Promise&lt;T&gt; | T</code></td>\n              <td className=\"desc\">Async or sync function to execute</td>\n            </tr>\n            <tr>\n              <td><code>options</code></td>\n              <td><code>T[] | Options | null</code></td>\n              <td className=\"desc\">Deps array, options object, or null</td>\n            </tr>\n            <tr className=\"api-group\"><td colSpan={3}>Options object</td></tr>\n            <tr>\n              <td><code>deps</code></td>\n              <td><code>T[] | null</code></td>\n              <td className=\"desc\">Dependencies array — triggers auto-execution when values change</td>\n            </tr>\n            <tr>\n              <td><code>optimisticPatch</code></td>\n              <td><code>T | ((args) =&gt; T)</code></td>\n              <td className=\"desc\">Value to set immediately on execute, before real response</td>\n            </tr>\n          </tbody>\n        </table>\n      </div>\n    </div>\n\n    {/* API Reference */}\n    <div className=\"section\">\n      <h2 className=\"section-title\">Surface</h2>\n      <div className=\"api-ref\">\n        <table>\n          <thead>\n            <tr>\n              <th>Property</th>\n              <th>Type</th>\n              <th>Description</th>\n            </tr>\n          </thead>\n          <tbody>\n            <tr className=\"api-group\"><td colSpan={3}>State</td></tr>\n            <tr>\n              <td><code>value</code></td>\n              <td><code>T | undefined</code></td>\n              <td className=\"desc\">Resolved value, persisted across re-executions</td>\n            </tr>\n            <tr>\n              <td><code>error</code></td>\n              <td><code>E | undefined</code></td>\n              <td className=\"desc\">Rejection reason</td>\n            </tr>\n            <tr>\n              <td><code>idle</code></td>\n              <td><code>boolean</code></td>\n              <td className=\"desc\">No request has been made yet</td>\n            </tr>\n            <tr>\n              <td><code>pending</code></td>\n              <td><code>boolean</code></td>\n              <td className=\"desc\">Request is in flight</td>\n            </tr>\n            <tr>\n              <td><code>completed</code></td>\n              <td><code>boolean</code></td>\n              <td className=\"desc\">Last request resolved successfully</td>\n            </tr>\n            <tr>\n              <td><code>failed</code></td>\n              <td><code>boolean</code></td>\n              <td className=\"desc\">Last request was rejected</td>\n            </tr>\n            <tr>\n              <td><code>status</code></td>\n              <td><code>UseRequestStatus</code></td>\n              <td className=\"desc\">'idle' | 'pending' | 'completed' | 'failed'</td>\n            </tr>\n            <tr className=\"api-group\"><td colSpan={3}>Actions</td></tr>\n            <tr>\n              <td><code className=\"method\">execute</code></td>\n              <td><code className=\"method\">(...args) =&gt; Promise</code></td>\n              <td className=\"desc\">Trigger the request manually</td>\n            </tr>\n            <tr>\n              <td><code className=\"method\">reset</code></td>\n              <td><code className=\"method\">() =&gt; void</code></td>\n              <td className=\"desc\">Reset to idle state, cancel pending requests</td>\n            </tr>\n            <tr className=\"api-group\"><td colSpan={3}>Patching</td></tr>\n            <tr>\n              <td><code>patched</code></td>\n              <td><code>false | 'manual' | 'auto'</code></td>\n              <td className=\"desc\">Whether current state is patched</td>\n            </tr>\n            <tr>\n              <td><code className=\"method\">patch</code></td>\n              <td><code className=\"method\">(input) =&gt; void</code></td>\n              <td className=\"desc\">Manually patch value and/or error</td>\n            </tr>\n            <tr>\n              <td><code className=\"method\">patchValue</code></td>\n              <td><code className=\"method\">(value) =&gt; void</code></td>\n              <td className=\"desc\">Shorthand to patch just the value</td>\n            </tr>\n            <tr>\n              <td><code className=\"method\">resetPatch</code></td>\n              <td><code className=\"method\">() =&gt; void</code></td>\n              <td className=\"desc\">Revert to last real server response</td>\n            </tr>\n          </tbody>\n        </table>\n        <table>\n          <tbody>\n            <tr className=\"api-group\"><td colSpan={3}>Constants</td></tr>\n            <tr>\n              <td><code className=\"api-enum-name\">UseRequestStatus</code></td>\n              <td colSpan={2}>\n                <code className=\"api-enum-import\">import {'{'} UseRequestStatus {'}'} from 'use-request'</code>\n                <div className=\"api-enum-values\">\n                  <span><code>UseRequestStatus.Idle</code></span>\n                  <span><code>UseRequestStatus.Pending</code></span>\n                  <span><code>UseRequestStatus.Completed</code></span>\n                  <span><code>UseRequestStatus.Failed</code></span>\n                </div>\n              </td>\n            </tr>\n          </tbody>\n        </table>\n      </div>\n    </div>\n\n    {/* Footer */}\n    <footer className=\"footer\">\n      MIT License &middot; <a href=\"https://github.com/termosa/use-request\">GitHub</a> &middot; <a href=\"https://www.npmjs.com/package/use-request\">npm</a>\n    </footer>\n  </div>\n)\n\nexport default App\n"],"mappings":"AAAA,MAAO,CAAAA,KAAK,KAAM,OAAO,CACzB,MAAO,CAAAC,qBAAqB,KAAM,yBAAyB,CAC3D,MAAO,CAAAC,gBAAgB,KAAM,oBAAoB,CACjD,MAAO,CAAAC,YAAY,KAAM,gB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