diff --git a/404.html b/404.html index 58ce810..9632f23 100644 --- a/404.html +++ b/404.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/asset-manifest.json b/asset-manifest.json index 3d53fae..a545fa0 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,6 +1,6 @@ { "umi.css": "/etc-hooks/umi.7ab43a5e.css", - "umi.js": "/etc-hooks/umi.92bf1def.js", + "umi.js": "/etc-hooks/umi.7167445d.js", "demos.js": "/etc-hooks/demos.a367812e.async.js", "nm__dumi__dist__client__pages__404.css": "/etc-hooks/nm__dumi__dist__client__pages__404.8b85f2d9.chunk.css", "nm__dumi__dist__client__pages__404.js": "/etc-hooks/nm__dumi__dist__client__pages__404.858418c0.async.js", diff --git a/guide/index.html b/guide/index.html index 58ce810..9632f23 100644 --- a/guide/index.html +++ b/guide/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/basic/index.html b/hooks/basic/index.html index 58ce810..9632f23 100644 --- a/hooks/basic/index.html +++ b/hooks/basic/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/index/index.html b/hooks/index/index.html index 58ce810..9632f23 100644 --- a/hooks/index/index.html +++ b/hooks/index/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-boolean/index.html b/hooks/use-boolean/index.html index 58ce810..9632f23 100644 --- a/hooks/use-boolean/index.html +++ b/hooks/use-boolean/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-callback-ref/index.html b/hooks/use-callback-ref/index.html index 58ce810..9632f23 100644 --- a/hooks/use-callback-ref/index.html +++ b/hooks/use-callback-ref/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-clipboard/index.html b/hooks/use-clipboard/index.html index 58ce810..9632f23 100644 --- a/hooks/use-clipboard/index.html +++ b/hooks/use-clipboard/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-counter/index.html b/hooks/use-counter/index.html index 58ce810..9632f23 100644 --- a/hooks/use-counter/index.html +++ b/hooks/use-counter/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-creation/index/index.html b/hooks/use-creation/index/index.html index 58ce810..9632f23 100644 --- a/hooks/use-creation/index/index.html +++ b/hooks/use-creation/index/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-debounce-fn/index.html b/hooks/use-debounce-fn/index.html index 58ce810..9632f23 100644 --- a/hooks/use-debounce-fn/index.html +++ b/hooks/use-debounce-fn/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-debounce/index.html b/hooks/use-debounce/index.html index 58ce810..9632f23 100644 --- a/hooks/use-debounce/index.html +++ b/hooks/use-debounce/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-latest/index.html b/hooks/use-latest/index.html index 58ce810..9632f23 100644 --- a/hooks/use-latest/index.html +++ b/hooks/use-latest/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-memoized-fn/index.html b/hooks/use-memoized-fn/index.html index 58ce810..9632f23 100644 --- a/hooks/use-memoized-fn/index.html +++ b/hooks/use-memoized-fn/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-mount/index.html b/hooks/use-mount/index.html index 58ce810..9632f23 100644 --- a/hooks/use-mount/index.html +++ b/hooks/use-mount/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-os/index.html b/hooks/use-os/index.html index 58ce810..9632f23 100644 --- a/hooks/use-os/index.html +++ b/hooks/use-os/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-set/index.html b/hooks/use-set/index.html index 58ce810..9632f23 100644 --- a/hooks/use-set/index.html +++ b/hooks/use-set/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-title/index.html b/hooks/use-title/index.html index 58ce810..9632f23 100644 --- a/hooks/use-title/index.html +++ b/hooks/use-title/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-toggle/index.html b/hooks/use-toggle/index.html index 58ce810..9632f23 100644 --- a/hooks/use-toggle/index.html +++ b/hooks/use-toggle/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-unmount-ref/index.html b/hooks/use-unmount-ref/index.html index 58ce810..9632f23 100644 --- a/hooks/use-unmount-ref/index.html +++ b/hooks/use-unmount-ref/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-unmount/index.html b/hooks/use-unmount/index.html index 58ce810..9632f23 100644 --- a/hooks/use-unmount/index.html +++ b/hooks/use-unmount/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/hooks/use-update/index.html b/hooks/use-update/index.html index 58ce810..9632f23 100644 --- a/hooks/use-update/index.html +++ b/hooks/use-update/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/index.html b/index.html index 58ce810..9632f23 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/umi.92bf1def.js b/umi.7167445d.js similarity index 99% rename from umi.92bf1def.js rename to umi.7167445d.js index 56f0311..97ad842 100644 --- a/umi.92bf1def.js +++ b/umi.7167445d.js @@ -37,27 +37,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ho(P,B){if(P){if(typeof P=="string")return no(P,B);var _=Object.prototype.toString.call(P).slice(8,-1);if(_==="Object"&&P.constructor&&(_=P.constructor.name),_==="Map"||_==="Set")return Array.from(P);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return no(P,B)}}function no(P,B){(B==null||B>P.length)&&(B=P.length);for(var _=0,de=new Array(B);_aa.length&&nt,Io=Object.values(_).reduce(function(Na,oi){return oi.path.startsWith(Gr.slice(1))&&((0,ne.qu)(Na[0],"nav",oi.meta.frontmatter),go&&(0,ne.qu)(Na[1],"nav.second",oi.meta.frontmatter)),Na},[{},{}]),ao=Uo(Io,2),Ua=ao[0],$o=ao[1];if(go){var ma,Ho,Oi;(ma=Ua.title)!==null&&ma!==void 0||(Ua.title=aa.split("/").pop().replace(/^[a-z]/,function(Na){return Na.toUpperCase()}));var Ro=(Ho=Ir[aa])!==null&&Ho!==void 0?Ho:Ir[aa]=zi(Ua,Dt,aa);(Oi=Ro.children)!==null&&Oi!==void 0||(Ro.children=[]),Ro.children.push(zi($o,Dt,Gr,Dt[0].children[0].link))}else Ir[Gr]=zi(Ua,Dt,Gr,Dt[0].children[0].link);return Ir},{}));return Jt.forEach(function(Ir,Wr){var cn;!Ir.link&&((cn=Ir.children)===null||cn===void 0?void 0:cn.length)===1?Jt[Wr]=Ir.children[0]:Ir.children&&Ir.children.sort(ot)}),Jt.sort(ot),Kt==="prepend"?Jt.unshift.apply(Jt,Fi(Sr)):Kt==="append"&&Jt.push.apply(Jt,Fi(Sr)),Jt}),ft=Uo(ct,1),Bt=ft[0];return Bt};function Co(P){"@babel/helpers - typeof";return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},Co(P)}function lu(P,B){return mo(P)||Ya(P,B)||xi(P,B)||fs()}function fs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xi(P,B){if(P){if(typeof P=="string")return ti(P,B);var _=Object.prototype.toString.call(P).slice(8,-1);if(_==="Object"&&P.constructor&&(_=P.constructor.name),_==="Map"||_==="Set")return Array.from(P);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return ti(P,B)}}function ti(P,B){(B==null||B>P.length)&&(B=P.length);for(var _=0,de=new Array(B);_P.length)&&(B=P.length);for(var _=0,de=new Array(B);_{var P=Object.create;var I=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames,R=Object.getOwnPropertySymbols,B=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var O=(e,t,i)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,M=(e,t)=>{for(var i in t||(t={}))E.call(t,i)&&O(e,i,t[i]);if(R)for(var i of R(t))L.call(t,i)&&O(e,i,t[i]);return e};var F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var N=(e,t,i,h)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of D(t))!E.call(e,a)&&a!==i&&I(e,a,{get:()=>t[a],enumerable:!(h=z(t,a))||h.enumerable});return e};var W=(e,t,i)=>(i=e!=null?P(B(e)):{},N(t||!e||!e.__esModule?I(i,"default",{value:e,enumerable:!0}):i,e));var j=F((K,w)=>{w.exports=function(e){var t={};function i(h){if(t[h])return t[h].exports;var a=t[h]={exports:{},id:h,loaded:!1};return e[h].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}return i.m=e,i.c=t,i.p="",i(0)}([function(e,t,i){e.exports=i(1)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=i(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return h.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return h.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return h.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return h.findChunks}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=t.findAll=function(s){var n=s.autoEscape,g=s.caseSensitive,f=g===void 0?!1:g,p=s.findChunks,u=p===void 0?a:p,c=s.sanitize,v=s.searchWords,T=s.textToHighlight;return l({chunksToHighlight:h({chunks:u({autoEscape:n,caseSensitive:f,sanitize:c,searchWords:v,textToHighlight:T})}),totalLength:T?T.length:0})},h=t.combineChunks=function(s){var n=s.chunks;return n=n.sort(function(g,f){return g.start-f.start}).reduce(function(g,f){if(g.length===0)return[f];var p=g.pop();if(f.start<=p.end){var u=Math.max(p.end,f.end);g.push({highlight:!1,start:p.start,end:u})}else g.push(p,f);return g},[]),n},a=function(s){var n=s.autoEscape,g=s.caseSensitive,f=s.sanitize,p=f===void 0?d:f,u=s.searchWords,c=s.textToHighlight;return c=p(c),u.filter(function(v){return v}).reduce(function(v,T){T=p(T),n&&(T=r(T));for(var m=new RegExp(T,g?"g":"gi"),x=void 0;x=m.exec(c);){var S=x.index,$=m.lastIndex;$>S&&v.push({highlight:!1,start:S,end:$}),x.index===m.lastIndex&&m.lastIndex++}return v},[])};t.findChunks=a;var l=t.fillInChunks=function(s){var n=s.chunksToHighlight,g=s.totalLength,f=[],p=function(v,T,m){T-v>0&&f.push({start:v,end:T,highlight:m})};if(n.length===0)p(0,g,!1);else{var u=0;n.forEach(function(c){p(u,c.start,!1),p(c.start,c.end,!0),u=c.end}),p(u,g,!1)}return f};function d(o){return o}function r(o){return o.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,"\\\\$&")}}])});var C=W(j());var H="tab";function k(e,t,i,h,a){let l=a!==void 0;return h.reduce((r,o)=>(o.tocIndex===a&&(r[o.paraId]=(r[o.paraId]||"").concat(o.value)),r),[]).filter(Boolean).length||l?{rawTitle:e,title:t,link:i,paragraphs:h.reduce((r,o)=>{var s,n;return o.tocIndex===a&&((n=r[s=o.paraId])!=null||(r[s]=""),r[o.paraId]+=o.value),r},[]).filter(Boolean)}:null}function y(e){return[e.title,e.subtitle].filter(Boolean).join(" ")}function _(e,t,i){let h=[],a=Object.values(t).reduce((l,d)=>{var r,o;return d.asset&&((o=l[r=d.routeId])!=null||(l[r]=[]),l[d.routeId].push(d)),l},{});return Object.values(e).forEach(l=>{var d;if("meta"in l&&!("isLayout"in l)){let r=l.meta,o=l.path.replace(/^([^/])/,"/$1")||"/",s=i.find(u=>o===u.link||o.startsWith(`${u.activePath}/`)),n=(a[l.id]||[]).map(u=>{var c;return(c=u.asset)==null?void 0:c.id}),g=k("",y(r.frontmatter),o,r.texts),f=r.toc.reduce((u,c,v)=>{if(!n.includes(c.id)&&c.depth>=1){let T=y(r.frontmatter);c.depth!==1&&(T=`${T} - ${c.title}`),u.push(k(c.title,T,`${o}#${c.id}`,r.texts,v))}return u},[]),p=(r.tabs||[]).reduce((u,{key:c,meta:v})=>{let T=k("",`${y(r.frontmatter)} - ${v.frontmatter.title}`,`${o}?${H}=${c}`,v.texts);return T&&u.push(T),u.push(...v.toc.map((m,x)=>k(m.title,`${y(r.frontmatter)} - ${v.frontmatter.title} - ${m.title}`,`${o}?${H}=${c}#${m.id}`,v.texts,x))),u},[]);h.push({navTitle:s==null?void 0:s.title,navOrder:s?i.indexOf(s):1/0,title:y(r.frontmatter),link:o,sections:[...g?[g]:[],...f,...p],demos:((d=a[l.id])==null?void 0:d.map(u=>({link:`${o}#${u.asset.id}`,rawTitle:u.asset.title||"",title:u.asset.title||y(r.frontmatter),description:u.asset.description||"",keywords:u.asset.keywords||[]})))||[]})}}),h}function b(e="",t,i=1){let h=(0,C.findAll)({textToHighlight:e,searchWords:t,autoEscape:!0}),a={};return[h.map(({start:l,end:d,highlight:r},o)=>{let s={text:e.slice(l,d)};return o===0&&!r&&h.length>1&&s.text.length>20&&(s.text=`...${s.text.slice(-20)}`),r&&(s.highlighted=!0,a[t.find(n=>s.text.includes(n))]=i),s}),a]}function Y(e,t){let i=t.split(" "),h=new RegExp(t.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&").replace(/\\s+/g,"|"),"i"),a={};return e.forEach(l=>{var o,s;let d=l.title,r=[];if(l.sections.forEach(n=>{for(let g of n.paragraphs)if(h.test(g)){let[f,p]=b(n.title,i,10),[u,c]=b(g,i);r.push({type:"content",link:n.link,priority:Object.values(M(M({},c),p)).reduce((v,T)=>v+T,0),highlightTitleTexts:f,highlightTexts:u,pageTitle:d});return}if(h.test(n.rawTitle)&&!h.test(l.title)){let[g,f]=b(n.title,i,10);r.push({type:"title",link:n.link,priority:Object.values(f).reduce((p,u)=>p+u,0),highlightTitleTexts:g,highlightTexts:b(n.paragraphs[0]||"",i)[0],pageTitle:d})}}),l.demos.forEach(n=>{if(h.test(n.rawTitle)||h.test(n.description)){let[g,f]=b(n.title,i,10),[p,u]=b(n.description,i);r.push({type:"demo",link:n.link,priority:Object.values(M(M({},u),f)).reduce((c,v)=>c+v,0),highlightTitleTexts:g,highlightTexts:p,pageTitle:d})}}),h.test(l.title)){let[n,g]=b(l.title,i,100);r.push({type:"page",link:l.link,priority:Object.values(g).reduce((f,p)=>f+p,0),highlightTitleTexts:n,highlightTexts:b(((o=l.sections[0])==null?void 0:o.paragraphs[0])||"",i)[0],pageTitle:d})}if(r.length){let n=l.navTitle||"$ROOT";(s=a[n])!=null||(a[n]={title:l.navTitle,priority:l.navOrder*1e3,hints:[]}),a[n].hints.push(...r)}}),Object.values(a).forEach(({hints:l})=>{l.sort((d,r)=>r.priority-d.priority)}),Object.values(a).sort((l,d)=>d.priority-l.priority)}var A;self.onmessage=({data:e})=>{switch(e.action){case"generate-metadata":A=_(e.args.routes,e.args.demos,e.args.nav);break;case"get-search-result":self.postMessage(Y(A,e.args.keywords));break;default:}};})();\n';function Si(P){"@babel/helpers - typeof";return Si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},Si(P)}function Wi(P,B){var _=Object.keys(P);if(Object.getOwnPropertySymbols){var de=Object.getOwnPropertySymbols(P);B&&(de=de.filter(function(He){return Object.getOwnPropertyDescriptor(P,He).enumerable})),_.push.apply(_,de)}return _}function bi(P){for(var B=1;BP.length)&&(B=P.length);for(var _=0,de=new Array(B);_P.length)&&(B=P.length);for(var _=0,de=new Array(B);_ void",paraId:4,tocIndex:6},{value:"set",paraId:4,tocIndex:6},{value:"\u8BBE\u7F6E state",paraId:4,tocIndex:6},{value:"(value: boolean) => void",paraId:4,tocIndex:6},{value:"setTrue",paraId:4,tocIndex:6},{value:"\u8BBE\u7F6E\u4E3A true",paraId:4,tocIndex:6},{value:"ToggleFn",paraId:4,tocIndex:6},{value:"setFalse",paraId:4,tocIndex:6},{value:"\u8BBE\u7F6E\u4E3A false",paraId:4,tocIndex:6},{value:"ToggleFn",paraId:4,tocIndex:6}],R={"packages-hooks-src-use-callback-ref-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,50408))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-callback-ref-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(1088).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},M={title:"useCallbackRef",toc:"menu",filename:"packages/hooks/src/useCallbackRef/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u4F18\u96C5\u7684\u7BA1\u7406\u56DE\u8C03\u51FD\u6570\u7684 Hook"},D=[{id:"usecallbackref",depth:1,title:"useCallbackRef"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"callback",depth:3,title:"Callback"},{id:"returntype",depth:3,title:"ReturnType"}],k=[{value:"\u4F18\u96C5\u7684\u7BA1\u7406\u56DE\u8C03\u51FD\u6570\u7684 Hook",paraId:0,tocIndex:0},{value:`const memoizedCallback = useCallbackRef(callback: Callback); -`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"callback",paraId:2,tocIndex:4},{value:"\u5FC5\u586B\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"Callback",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"Callback",paraId:3},{value:"\u53C2\u6570",paraId:4,tocIndex:5},{value:"\u8BF4\u660E",paraId:4,tocIndex:5},{value:"\u7C7B\u578B",paraId:4,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:4,tocIndex:5},{value:"Callback",paraId:4,tocIndex:5},{value:"\u56DE\u6389\u51FD\u6570",paraId:4,tocIndex:5},{value:"(...args: any[]) => any",paraId:4,tocIndex:5},{value:"-",paraId:4,tocIndex:5},{value:"\u53C2\u6570",paraId:5,tocIndex:6},{value:"\u8BF4\u660E",paraId:5,tocIndex:6},{value:"\u7C7B\u578B",paraId:5,tocIndex:6},{value:"memoizedCallback",paraId:5,tocIndex:6},{value:"\u7ECF\u8FC7 Hook \u5904\u7406\u540E\u7684\u56DE\u8C03\u51FD\u6570",paraId:5,tocIndex:6},{value:"Callback",paraId:5,tocIndex:6}],j={"packages-hooks-src-use-clipboard-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,49859))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-clipboard-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(21422).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},C={title:"useClipboard",toc:"menu",filename:"packages/hooks/src/useClipboard/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u57FA\u4E8E window.clipboard \u7684\u526A\u8D34\u677F Hook"},L=[{id:"useclipboard",depth:1,title:"useClipboard"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"returntype",depth:3,title:"ReturnType"}],U=[{value:"\u57FA\u4E8E ",paraId:0,tocIndex:0},{value:"window.clipboard",paraId:0,tocIndex:0},{value:" \u7684\u526A\u8D34\u677F Hook",paraId:0,tocIndex:0},{value:`const clipboard = useClipboard(options?: { timeout: number }); -`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"options",paraId:2,tocIndex:4},{value:"\u975E\u5FC5\u586B\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"{ timeout: number }",paraId:2,tocIndex:4},{value:"timeout = 2000",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"copy",paraId:3,tocIndex:5},{value:"\u7ECF\u8FC7 Hook \u5904\u7406\u540E\u7684\u526A\u8D34\u677F\u590D\u5236\u51FD\u6570\u3002\u8BE5\u51FD\u6570\u9700\u8981\u4F20\u5165\u4E00\u4E2A\u8981\u590D\u5236\u5230\u526A\u8D34\u677F\u7684\u5B57\u7B26\u4E32\u4F5C\u4E3A\u53C2\u6570\uFF0C\u5E76\u8FD4\u56DE\u4E00\u4E2A void \u7C7B\u578B\u503C\u3002\u5982\u679C\u590D\u5236\u6210\u529F\uFF0C\u4F1A\u5C06 copied \u72B6\u6001\u8BBE\u7F6E\u4E3A true\uFF1B\u5426\u5219\uFF0C\u5C06 error \u72B6\u6001\u8BBE\u7F6E\u4E3A\u76F8\u5E94\u7684\u9519\u8BEF\u4FE1\u606F\u3002",paraId:3,tocIndex:5},{value:"(valueToCopy: string) => void",paraId:3,tocIndex:5},{value:"reset",paraId:3,tocIndex:5},{value:"\u91CD\u7F6E\u526A\u8D34\u677F\u72B6\u6001\u548C\u9519\u8BEF\u4FE1\u606F\u7684\u51FD\u6570",paraId:3,tocIndex:5},{value:"() => void",paraId:3,tocIndex:5},{value:"error",paraId:3,tocIndex:5},{value:"\u526A\u8D34\u677F\u64CD\u4F5C\u8FC7\u7A0B\u4E2D\u7684\u9519\u8BEF\u4FE1\u606F",paraId:3,tocIndex:5},{value:"Error",paraId:3,tocIndex:5},{value:"copied",paraId:3,tocIndex:5},{value:"\u8868\u793A\u662F\u5426\u5DF2\u6210\u529F\u590D\u5236\u5230\u526A\u8D34\u677F\u7684\u72B6\u6001",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5}],J={"packages-hooks-src-use-counter-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,82317))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-counter-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(6512).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},re={title:"useCounter",toc:"menu",filename:"packages/hooks/src/useCounter/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u4F18\u96C5\u7684\u7BA1\u7406\u8BA1\u6570\u72B6\u6001\u7684 Hook\u3002"},q=[{id:"usecounter",depth:1,title:"useCounter"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"counteroptions",depth:3,title:"counterOptions"},{id:"actions",depth:3,title:"Actions"}],fe=[{value:"\u4F18\u96C5\u7684\u7BA1\u7406\u8BA1\u6570\u72B6\u6001\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`const [state, { set, reset, increment, decrement }] = useCounter( +`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"defaultValue",paraId:2,tocIndex:4},{value:"\u53EF\u9009\u9879\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"boolean",paraId:2,tocIndex:4},{value:"false",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"state",paraId:3,tocIndex:5},{value:"\u72B6\u6001\u503C",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"actions",paraId:3,tocIndex:5},{value:"\u64CD\u4F5C\u96C6\u5408",paraId:3,tocIndex:5},{value:"Actions",paraId:3,tocIndex:5},{value:"\u53C2\u6570",paraId:4,tocIndex:6},{value:"\u8BF4\u660E",paraId:4,tocIndex:6},{value:"\u7C7B\u578B",paraId:4,tocIndex:6},{value:"toggle",paraId:4,tocIndex:6},{value:"\u5207\u6362 state",paraId:4,tocIndex:6},{value:"ToggleFn: () => void",paraId:4,tocIndex:6},{value:"set",paraId:4,tocIndex:6},{value:"\u8BBE\u7F6E state",paraId:4,tocIndex:6},{value:"(value: boolean) => void",paraId:4,tocIndex:6},{value:"setTrue",paraId:4,tocIndex:6},{value:"\u8BBE\u7F6E\u4E3A true",paraId:4,tocIndex:6},{value:"ToggleFn",paraId:4,tocIndex:6},{value:"setFalse",paraId:4,tocIndex:6},{value:"\u8BBE\u7F6E\u4E3A false",paraId:4,tocIndex:6},{value:"ToggleFn",paraId:4,tocIndex:6}],R={"packages-hooks-src-use-callback-ref-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,50408))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-callback-ref-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(1088).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},M={title:"useCallbackRef",toc:"menu",filename:"packages/hooks/src/useCallbackRef/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u4F18\u96C5\u7684\u7BA1\u7406\u56DE\u8C03\u51FD\u6570\u7684 Hook"},D=[{id:"usecallbackref",depth:1,title:"useCallbackRef"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"callback",depth:3,title:"Callback"},{id:"returntype",depth:3,title:"ReturnType"}],k=[{value:"\u4F18\u96C5\u7684\u7BA1\u7406\u56DE\u8C03\u51FD\u6570\u7684 Hook",paraId:0,tocIndex:0},{value:`const memoizedCallback = useCallbackRef(callback: Callback); +`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"callback",paraId:2,tocIndex:4},{value:"\u5FC5\u586B\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"Callback",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"Callback",paraId:3},{value:"\u53C2\u6570",paraId:4,tocIndex:5},{value:"\u8BF4\u660E",paraId:4,tocIndex:5},{value:"\u7C7B\u578B",paraId:4,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:4,tocIndex:5},{value:"Callback",paraId:4,tocIndex:5},{value:"\u56DE\u6389\u51FD\u6570",paraId:4,tocIndex:5},{value:"(...args: any[]) => any",paraId:4,tocIndex:5},{value:"-",paraId:4,tocIndex:5},{value:"\u53C2\u6570",paraId:5,tocIndex:6},{value:"\u8BF4\u660E",paraId:5,tocIndex:6},{value:"\u7C7B\u578B",paraId:5,tocIndex:6},{value:"memoizedCallback",paraId:5,tocIndex:6},{value:"\u7ECF\u8FC7 Hook \u5904\u7406\u540E\u7684\u56DE\u8C03\u51FD\u6570",paraId:5,tocIndex:6},{value:"Callback",paraId:5,tocIndex:6}],j={"packages-hooks-src-use-clipboard-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,49859))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-clipboard-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(21422).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},C={title:"useClipboard",toc:"menu",filename:"packages/hooks/src/useClipboard/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u57FA\u4E8E window.clipboard \u7684\u526A\u8D34\u677F Hook"},L=[{id:"useclipboard",depth:1,title:"useClipboard"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"returntype",depth:3,title:"ReturnType"}],U=[{value:"\u57FA\u4E8E ",paraId:0,tocIndex:0},{value:"window.clipboard",paraId:0,tocIndex:0},{value:" \u7684\u526A\u8D34\u677F Hook",paraId:0,tocIndex:0},{value:`const clipboard = useClipboard(options?: { timeout: number }); +`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"options",paraId:2,tocIndex:4},{value:"\u975E\u5FC5\u586B\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"{ timeout: number }",paraId:2,tocIndex:4},{value:"timeout = 2000",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"copy",paraId:3,tocIndex:5},{value:"\u7ECF\u8FC7 Hook \u5904\u7406\u540E\u7684\u526A\u8D34\u677F\u590D\u5236\u51FD\u6570\u3002\u8BE5\u51FD\u6570\u9700\u8981\u4F20\u5165\u4E00\u4E2A\u8981\u590D\u5236\u5230\u526A\u8D34\u677F\u7684\u5B57\u7B26\u4E32\u4F5C\u4E3A\u53C2\u6570\uFF0C\u5E76\u8FD4\u56DE\u4E00\u4E2A void \u7C7B\u578B\u503C\u3002\u5982\u679C\u590D\u5236\u6210\u529F\uFF0C\u4F1A\u5C06 copied \u72B6\u6001\u8BBE\u7F6E\u4E3A true\uFF1B\u5426\u5219\uFF0C\u5C06 error \u72B6\u6001\u8BBE\u7F6E\u4E3A\u76F8\u5E94\u7684\u9519\u8BEF\u4FE1\u606F\u3002",paraId:3,tocIndex:5},{value:"(valueToCopy: string) => void",paraId:3,tocIndex:5},{value:"reset",paraId:3,tocIndex:5},{value:"\u91CD\u7F6E\u526A\u8D34\u677F\u72B6\u6001\u548C\u9519\u8BEF\u4FE1\u606F\u7684\u51FD\u6570",paraId:3,tocIndex:5},{value:"() => void",paraId:3,tocIndex:5},{value:"error",paraId:3,tocIndex:5},{value:"\u526A\u8D34\u677F\u64CD\u4F5C\u8FC7\u7A0B\u4E2D\u7684\u9519\u8BEF\u4FE1\u606F",paraId:3,tocIndex:5},{value:"Error",paraId:3,tocIndex:5},{value:"copied",paraId:3,tocIndex:5},{value:"\u8868\u793A\u662F\u5426\u5DF2\u6210\u529F\u590D\u5236\u5230\u526A\u8D34\u677F\u7684\u72B6\u6001",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5}],J={"packages-hooks-src-use-counter-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,82317))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-counter-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(6512).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},re={title:"useCounter",toc:"menu",filename:"packages/hooks/src/useCounter/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u4F18\u96C5\u7684\u7BA1\u7406\u8BA1\u6570\u72B6\u6001\u7684 Hook\u3002"},q=[{id:"usecounter",depth:1,title:"useCounter"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"counteroptions",depth:3,title:"counterOptions"},{id:"actions",depth:3,title:"Actions"}],fe=[{value:"\u4F18\u96C5\u7684\u7BA1\u7406\u8BA1\u6570\u72B6\u6001\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`const [state, { set, reset, increment, decrement }] = useCounter( initialValue: number, options: counterOptions ); -`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"initialValue",paraId:2,tocIndex:4},{value:"\u5FC5\u586B\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"number",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"options",paraId:2,tocIndex:4},{value:"\u53EF\u9009\u9879\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"counterOptions",paraId:2,tocIndex:4},{value:"{ min: -Infinity, max: Infinity }",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:5},{value:"min",paraId:3,tocIndex:5},{value:"\u6700\u5C0F\u503C",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"-Infinity",paraId:3,tocIndex:5},{value:"max",paraId:3,tocIndex:5},{value:"\u6700\u5927\u503C",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"Infinity",paraId:3,tocIndex:5},{value:"\u53C2\u6570",paraId:4,tocIndex:6},{value:"\u8BF4\u660E",paraId:4,tocIndex:6},{value:"\u7C7B\u578B",paraId:4,tocIndex:6},{value:"set",paraId:4,tocIndex:6},{value:"\u8BBE\u7F6E couter",paraId:4,tocIndex:6},{value:"(value: number) => void",paraId:4,tocIndex:6},{value:"reset",paraId:4,tocIndex:6},{value:"\u91CD\u7F6E couter",paraId:4,tocIndex:6},{value:"() => void",paraId:4,tocIndex:6},{value:"increment",paraId:4,tocIndex:6},{value:"couter + 1",paraId:4,tocIndex:6},{value:"() => void",paraId:4,tocIndex:6},{value:"decrement",paraId:4,tocIndex:6},{value:"couter - 1",paraId:4,tocIndex:6},{value:"() => void",paraId:4,tocIndex:6}],we={"packages-hooks-src-use-creation-index-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,53146))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-creation-index-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(16390).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},Ce={title:"useCreation",toc:"menu",filename:"packages/hooks/src/useCreation/index..md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"useCreation \u662F useMemo \u6216 useRef \u7684\u66FF\u4EE3\u54C1\u3002"},oe=[{id:"usecreation",depth:1,title:"useCreation"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"}],ue=[{value:"useCreation",paraId:0,tocIndex:0},{value:" \u662F ",paraId:0,tocIndex:0},{value:"useMemo",paraId:0,tocIndex:0},{value:" \u6216 ",paraId:0,tocIndex:0},{value:"useRef",paraId:0,tocIndex:0},{value:" \u7684\u66FF\u4EE3\u54C1\u3002",paraId:0,tocIndex:0},{value:"\u56E0\u4E3A ",paraId:1,tocIndex:0},{value:"useMemo",paraId:1,tocIndex:0},{value:" \u4E0D\u80FD\u4FDD\u8BC1\u88AB memo \u7684\u503C\u4E00\u5B9A\u4E0D\u4F1A\u88AB\u91CD\u8BA1\u7B97\uFF0C\u800C ",paraId:1,tocIndex:0},{value:"useCreation",paraId:1,tocIndex:0},{value:" \u53EF\u4EE5\u4FDD\u8BC1\u8FD9\u4E00\u70B9\u3002\u4EE5\u4E0B\u4E3A React \u5B98\u65B9\u6587\u6863\u4E2D\u7684\u4ECB\u7ECD\uFF1A",paraId:1,tocIndex:0},{value:"\u800C\u76F8\u6BD4\u4E8E ",paraId:2,tocIndex:0},{value:"useRef",paraId:2,tocIndex:0},{value:"\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528 ",paraId:2,tocIndex:0},{value:"useCreation",paraId:2,tocIndex:0},{value:" \u521B\u5EFA\u4E00\u4E9B\u5E38\u91CF\uFF0C\u8FD9\u4E9B\u5E38\u91CF\u548C ",paraId:2,tocIndex:0},{value:"useRef",paraId:2,tocIndex:0},{value:" \u521B\u5EFA\u51FA\u6765\u7684 ref \u6709\u5F88\u591A\u4F7F\u7528\u573A\u666F\u4E0A\u7684\u76F8\u4F3C\uFF0C\u4F46\u5BF9\u4E8E\u590D\u6742\u5E38\u91CF\u7684\u521B\u5EFA\uFF0C",paraId:2,tocIndex:0},{value:"useRef",paraId:2,tocIndex:0},{value:" \u5374\u5BB9\u6613\u51FA\u73B0\u6F5C\u5728\u7684\u6027\u80FD\u9690\u60A3\u3002",paraId:2,tocIndex:0},{value:`const a = useRef(new Subject()); // \u6BCF\u6B21\u91CD\u6E32\u67D3\uFF0C\u90FD\u4F1A\u6267\u884C\u5B9E\u4F8B\u5316 Subject \u7684\u8FC7\u7A0B\uFF0C\u5373\u4FBF\u8FD9\u4E2A\u5B9E\u4F8B\u7ACB\u523B\u5C31\u88AB\u6254\u6389\u4E86 +`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"initialValue",paraId:2,tocIndex:4},{value:"\u5FC5\u586B\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"number",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"options",paraId:2,tocIndex:4},{value:"\u53EF\u9009\u9879\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"counterOptions",paraId:2,tocIndex:4},{value:"{ min: -Infinity, max: Infinity }",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:5},{value:"min",paraId:3,tocIndex:5},{value:"\u6700\u5C0F\u503C",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"-Infinity",paraId:3,tocIndex:5},{value:"max",paraId:3,tocIndex:5},{value:"\u6700\u5927\u503C",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"Infinity",paraId:3,tocIndex:5},{value:"\u53C2\u6570",paraId:4,tocIndex:6},{value:"\u8BF4\u660E",paraId:4,tocIndex:6},{value:"\u7C7B\u578B",paraId:4,tocIndex:6},{value:"set",paraId:4,tocIndex:6},{value:"\u8BBE\u7F6E couter",paraId:4,tocIndex:6},{value:"(value: number) => void",paraId:4,tocIndex:6},{value:"reset",paraId:4,tocIndex:6},{value:"\u91CD\u7F6E couter",paraId:4,tocIndex:6},{value:"() => void",paraId:4,tocIndex:6},{value:"increment",paraId:4,tocIndex:6},{value:"couter + 1",paraId:4,tocIndex:6},{value:"() => void",paraId:4,tocIndex:6},{value:"decrement",paraId:4,tocIndex:6},{value:"couter - 1",paraId:4,tocIndex:6},{value:"() => void",paraId:4,tocIndex:6}],we={"packages-hooks-src-use-creation-index-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,53146))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-creation-index-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(16390).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},Ce={title:"useCreation",toc:"menu",filename:"packages/hooks/src/useCreation/index..md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"useCreation \u662F useMemo \u6216 useRef \u7684\u66FF\u4EE3\u54C1\u3002"},oe=[{id:"usecreation",depth:1,title:"useCreation"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"}],ue=[{value:"useCreation",paraId:0,tocIndex:0},{value:" \u662F ",paraId:0,tocIndex:0},{value:"useMemo",paraId:0,tocIndex:0},{value:" \u6216 ",paraId:0,tocIndex:0},{value:"useRef",paraId:0,tocIndex:0},{value:" \u7684\u66FF\u4EE3\u54C1\u3002",paraId:0,tocIndex:0},{value:"\u56E0\u4E3A ",paraId:1,tocIndex:0},{value:"useMemo",paraId:1,tocIndex:0},{value:" \u4E0D\u80FD\u4FDD\u8BC1\u88AB memo \u7684\u503C\u4E00\u5B9A\u4E0D\u4F1A\u88AB\u91CD\u8BA1\u7B97\uFF0C\u800C ",paraId:1,tocIndex:0},{value:"useCreation",paraId:1,tocIndex:0},{value:" \u53EF\u4EE5\u4FDD\u8BC1\u8FD9\u4E00\u70B9\u3002\u4EE5\u4E0B\u4E3A React \u5B98\u65B9\u6587\u6863\u4E2D\u7684\u4ECB\u7ECD\uFF1A",paraId:1,tocIndex:0},{value:"\u800C\u76F8\u6BD4\u4E8E ",paraId:2,tocIndex:0},{value:"useRef",paraId:2,tocIndex:0},{value:"\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528 ",paraId:2,tocIndex:0},{value:"useCreation",paraId:2,tocIndex:0},{value:" \u521B\u5EFA\u4E00\u4E9B\u5E38\u91CF\uFF0C\u8FD9\u4E9B\u5E38\u91CF\u548C ",paraId:2,tocIndex:0},{value:"useRef",paraId:2,tocIndex:0},{value:" \u521B\u5EFA\u51FA\u6765\u7684 ref \u6709\u5F88\u591A\u4F7F\u7528\u573A\u666F\u4E0A\u7684\u76F8\u4F3C\uFF0C\u4F46\u5BF9\u4E8E\u590D\u6742\u5E38\u91CF\u7684\u521B\u5EFA\uFF0C",paraId:2,tocIndex:0},{value:"useRef",paraId:2,tocIndex:0},{value:" \u5374\u5BB9\u6613\u51FA\u73B0\u6F5C\u5728\u7684\u6027\u80FD\u9690\u60A3\u3002",paraId:2,tocIndex:0},{value:`const a = useRef(new Subject()); // \u6BCF\u6B21\u91CD\u6E32\u67D3\uFF0C\u90FD\u4F1A\u6267\u884C\u5B9E\u4F8B\u5316 Subject \u7684\u8FC7\u7A0B\uFF0C\u5373\u4FBF\u8FD9\u4E2A\u5B9E\u4F8B\u7ACB\u523B\u5C31\u88AB\u6254\u6389\u4E86 const b = useCreation(() => new Subject(), []); // \u901A\u8FC7 factory \u51FD\u6570\uFF0C\u53EF\u4EE5\u907F\u514D\u6027\u80FD\u9690\u60A3 `,paraId:3,tocIndex:0},{value:`function useCreation(factory: () => T, deps: any[]): T; -`,paraId:4,tocIndex:3},{value:"\u53C2\u6570",paraId:5,tocIndex:4},{value:"\u8BF4\u660E",paraId:5,tocIndex:4},{value:"\u7C7B\u578B",paraId:5,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:5,tocIndex:4},{value:"factory",paraId:5,tocIndex:4},{value:"\u7528\u6765\u521B\u5EFA\u6240\u9700\u5BF9\u8C61\u7684\u51FD\u6570",paraId:5,tocIndex:4},{value:"() => any",paraId:5,tocIndex:4},{value:"-",paraId:5,tocIndex:4},{value:"deps",paraId:5,tocIndex:4},{value:"\u4F20\u5165\u4F9D\u8D56\u53D8\u5316\u7684\u5BF9\u8C61",paraId:5,tocIndex:4},{value:"any[]",paraId:5,tocIndex:4},{value:"-",paraId:5,tocIndex:4}],ce={"packages-hooks-src-use-debounce-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,1001))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-debounce-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(61509).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},W={title:"useDebounce",toc:"menu",filename:"packages/hooks/src/useDebounce/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u7528\u6765\u5904\u7406\u9632\u6296\u503C\u7684 Hook\u3002"},X=[{id:"usedebounce",depth:1,title:"useDebounce"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"options",depth:3,title:"Options"}],te=[{value:"\u7528\u6765\u5904\u7406\u9632\u6296\u503C\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`const debouncedValue = useDebounce( +`,paraId:4,tocIndex:3},{value:"\u53C2\u6570",paraId:5,tocIndex:4},{value:"\u8BF4\u660E",paraId:5,tocIndex:4},{value:"\u7C7B\u578B",paraId:5,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:5,tocIndex:4},{value:"factory",paraId:5,tocIndex:4},{value:"\u7528\u6765\u521B\u5EFA\u6240\u9700\u5BF9\u8C61\u7684\u51FD\u6570",paraId:5,tocIndex:4},{value:"() => any",paraId:5,tocIndex:4},{value:"-",paraId:5,tocIndex:4},{value:"deps",paraId:5,tocIndex:4},{value:"\u4F20\u5165\u4F9D\u8D56\u53D8\u5316\u7684\u5BF9\u8C61",paraId:5,tocIndex:4},{value:"any[]",paraId:5,tocIndex:4},{value:"-",paraId:5,tocIndex:4}],ce={"packages-hooks-src-use-debounce-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,1001))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-debounce-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(61509).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},W={title:"useDebounce",toc:"menu",filename:"packages/hooks/src/useDebounce/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u7528\u6765\u5904\u7406\u9632\u6296\u503C\u7684 Hook\u3002"},X=[{id:"usedebounce",depth:1,title:"useDebounce"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"options",depth:3,title:"Options"}],te=[{value:"\u7528\u6765\u5904\u7406\u9632\u6296\u503C\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`const debouncedValue = useDebounce( value: any, options?: Options ); -`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"value",paraId:2,tocIndex:4},{value:"\u9700\u8981\u9632\u6296\u7684\u503C",paraId:2,tocIndex:4},{value:"any",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"options",paraId:2,tocIndex:4},{value:"\u914D\u7F6E\u9632\u6296\u7684\u884C\u4E3A",paraId:2,tocIndex:4},{value:"Options",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:5},{value:"wait",paraId:3,tocIndex:5},{value:"\u8D85\u65F6\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"1000",paraId:3,tocIndex:5},{value:"leading",paraId:3,tocIndex:5},{value:"\u662F\u5426\u5728\u5EF6\u8FDF\u5F00\u59CB\u524D\u8C03\u7528\u51FD\u6570",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"false",paraId:3,tocIndex:5},{value:"trailing",paraId:3,tocIndex:5},{value:"\u662F\u5426\u5728\u5EF6\u8FDF\u5F00\u59CB\u540E\u8C03\u7528\u51FD\u6570",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"true",paraId:3,tocIndex:5},{value:"maxWait",paraId:3,tocIndex:5},{value:"\u6700\u5927\u7B49\u5F85\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"-",paraId:3,tocIndex:5}],T={"packages-hooks-src-use-debounce-fn-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,78899))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-debounce-fn-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(89625).Z},"etc-hooks":{type:"NPM",value:"0.4.2"},react:{type:"NPM",value:"18.2.0"},antd:{type:"NPM",value:"5.9.3"}}}}},N={title:"useDebounceFn",toc:"menu",filename:"packages/hooks/src/useDebounceFn/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u7528\u6765\u5904\u7406\u9632\u6296\u51FD\u6570\u7684 Hook\u3002"},Z=[{id:"usedebouncefn",depth:1,title:"useDebounceFn"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"options",depth:3,title:"Options"},{id:"result",depth:3,title:"Result"}],Y=[{value:"\u7528\u6765\u5904\u7406\u9632\u6296\u51FD\u6570\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`const { +`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"value",paraId:2,tocIndex:4},{value:"\u9700\u8981\u9632\u6296\u7684\u503C",paraId:2,tocIndex:4},{value:"any",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"options",paraId:2,tocIndex:4},{value:"\u914D\u7F6E\u9632\u6296\u7684\u884C\u4E3A",paraId:2,tocIndex:4},{value:"Options",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:5},{value:"wait",paraId:3,tocIndex:5},{value:"\u8D85\u65F6\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"1000",paraId:3,tocIndex:5},{value:"leading",paraId:3,tocIndex:5},{value:"\u662F\u5426\u5728\u5EF6\u8FDF\u5F00\u59CB\u524D\u8C03\u7528\u51FD\u6570",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"false",paraId:3,tocIndex:5},{value:"trailing",paraId:3,tocIndex:5},{value:"\u662F\u5426\u5728\u5EF6\u8FDF\u5F00\u59CB\u540E\u8C03\u7528\u51FD\u6570",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"true",paraId:3,tocIndex:5},{value:"maxWait",paraId:3,tocIndex:5},{value:"\u6700\u5927\u7B49\u5F85\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"-",paraId:3,tocIndex:5}],T={"packages-hooks-src-use-debounce-fn-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,78899))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-debounce-fn-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(89625).Z},"etc-hooks":{type:"NPM",value:"0.4.2"},react:{type:"NPM",value:"18.2.0"},antd:{type:"NPM",value:"5.9.3"}}}}},N={title:"useDebounceFn",toc:"menu",filename:"packages/hooks/src/useDebounceFn/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u7528\u6765\u5904\u7406\u9632\u6296\u51FD\u6570\u7684 Hook\u3002"},Z=[{id:"usedebouncefn",depth:1,title:"useDebounceFn"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"options",depth:3,title:"Options"},{id:"result",depth:3,title:"Result"}],Y=[{value:"\u7528\u6765\u5904\u7406\u9632\u6296\u51FD\u6570\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`const { run, cancel, flush @@ -65,8 +65,8 @@ const b = useCreation(() => new Subject(), []); // \u901A\u8FC7 factory \u51FD\u fn: (...args: any[]) => any, options?: Options ); -`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"fn",paraId:2,tocIndex:4},{value:"\u9700\u8981\u9632\u6296\u6267\u884C\u7684\u51FD\u6570",paraId:2,tocIndex:4},{value:"(...args: any[]) => any",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"options",paraId:2,tocIndex:4},{value:"\u914D\u7F6E\u9632\u6296\u7684\u884C\u4E3A",paraId:2,tocIndex:4},{value:"Options",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:5},{value:"wait",paraId:3,tocIndex:5},{value:"\u7B49\u5F85\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"1000",paraId:3,tocIndex:5},{value:"leading",paraId:3,tocIndex:5},{value:"\u662F\u5426\u5728\u5EF6\u8FDF\u5F00\u59CB\u524D\u8C03\u7528\u51FD\u6570",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"false",paraId:3,tocIndex:5},{value:"trailing",paraId:3,tocIndex:5},{value:"\u662F\u5426\u5728\u5EF6\u8FDF\u5F00\u59CB\u540E\u8C03\u7528\u51FD\u6570",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"true",paraId:3,tocIndex:5},{value:"maxWait",paraId:3,tocIndex:5},{value:"\u6700\u5927\u7B49\u5F85\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"-",paraId:3,tocIndex:5},{value:"\u53C2\u6570",paraId:4,tocIndex:6},{value:"\u8BF4\u660E",paraId:4,tocIndex:6},{value:"\u7C7B\u578B",paraId:4,tocIndex:6},{value:"run",paraId:4,tocIndex:6},{value:"\u89E6\u53D1\u6267\u884C fn\uFF0C\u51FD\u6570\u53C2\u6570\u5C06\u4F1A\u4F20\u9012\u7ED9 fn",paraId:4,tocIndex:6},{value:"(...args: any[]) => any",paraId:4,tocIndex:6},{value:"cancel",paraId:4,tocIndex:6},{value:"\u53D6\u6D88\u5F53\u524D\u9632\u6296",paraId:4,tocIndex:6},{value:"() => void",paraId:4,tocIndex:6},{value:"flush",paraId:4,tocIndex:6},{value:"\u7ACB\u5373\u8C03\u7528\u5F53\u524D\u9632\u6296\u51FD\u6570",paraId:4,tocIndex:6},{value:"() => void",paraId:4,tocIndex:6}],K={"packages-hooks-src-use-latest-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,29638))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-latest-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(85782).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}}},w={title:"useLatest",toc:"menu",filename:"packages/hooks/src/useLatest/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u8FD4\u56DE\u5F53\u524D\u6700\u65B0\u503C\u7684 Hook\uFF0C\u53EF\u4EE5\u907F\u514D\u95ED\u5305\u95EE\u9898\u3002"},H=[{id:"uselatest",depth:1,title:"useLatest"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"}],$=[{value:"\u8FD4\u56DE\u5F53\u524D\u6700\u65B0\u503C\u7684 Hook\uFF0C\u53EF\u4EE5\u907F\u514D\u95ED\u5305\u95EE\u9898\u3002",paraId:0,tocIndex:0},{value:`const latestValueRef = useLatest(value: T): MutableRefObject; -`,paraId:1,tocIndex:3}],Q={"packages-hooks-src-use-memoized-fn-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,1912))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-memoized-fn-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(48521).Z},react:{type:"NPM",value:"18.2.0"},antd:{type:"NPM",value:"5.9.3"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}},"packages-hooks-src-use-memoized-fn-demo-example2":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,30076))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-memoized-fn-demo-example2",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(30267).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},ee={title:"useMemoizedFn",toc:"menu",filename:"packages/hooks/src/useMemoizedFn/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u6301\u4E45\u5316 function \u7684 Hook\uFF0C\u7406\u8BBA\u4E0A\uFF0C\u53EF\u4EE5\u4F7F\u7528 useMemoizedFn \u5B8C\u5168\u4EE3\u66FF useCallback\u3002"},Oe=[{id:"usememoizedfn",depth:1,title:"useMemoizedFn"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"\u6027\u80FD\u63D0\u5347",depth:3,title:"\u6027\u80FD\u63D0\u5347"},{id:"api",depth:2,title:"API"},{id:"result",depth:3,title:"Result"},{id:"params",depth:3,title:"Params"}],Be=[{value:"\u6301\u4E45\u5316 function \u7684 Hook\uFF0C\u7406\u8BBA\u4E0A\uFF0C\u53EF\u4EE5\u4F7F\u7528 useMemoizedFn \u5B8C\u5168\u4EE3\u66FF useCallback\u3002",paraId:0,tocIndex:0},{value:"\u5728\u67D0\u4E9B\u573A\u666F\u4E2D\uFF0C\u6211\u4EEC\u9700\u8981\u4F7F\u7528 useCallback \u6765\u8BB0\u4F4F\u4E00\u4E2A\u51FD\u6570\uFF0C\u4F46\u662F\u5728\u7B2C\u4E8C\u4E2A\u53C2\u6570 deps \u53D8\u5316\u65F6\uFF0C\u4F1A\u91CD\u65B0\u751F\u6210\u51FD\u6570\uFF0C\u5BFC\u81F4\u51FD\u6570\u5730\u5740\u53D8\u5316\u3002",paraId:1,tocIndex:0},{value:`const [state, setState] = useState(''); +`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"fn",paraId:2,tocIndex:4},{value:"\u9700\u8981\u9632\u6296\u6267\u884C\u7684\u51FD\u6570",paraId:2,tocIndex:4},{value:"(...args: any[]) => any",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"options",paraId:2,tocIndex:4},{value:"\u914D\u7F6E\u9632\u6296\u7684\u884C\u4E3A",paraId:2,tocIndex:4},{value:"Options",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:5},{value:"wait",paraId:3,tocIndex:5},{value:"\u7B49\u5F85\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"1000",paraId:3,tocIndex:5},{value:"leading",paraId:3,tocIndex:5},{value:"\u662F\u5426\u5728\u5EF6\u8FDF\u5F00\u59CB\u524D\u8C03\u7528\u51FD\u6570",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"false",paraId:3,tocIndex:5},{value:"trailing",paraId:3,tocIndex:5},{value:"\u662F\u5426\u5728\u5EF6\u8FDF\u5F00\u59CB\u540E\u8C03\u7528\u51FD\u6570",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"true",paraId:3,tocIndex:5},{value:"maxWait",paraId:3,tocIndex:5},{value:"\u6700\u5927\u7B49\u5F85\u65F6\u95F4\uFF0C\u5355\u4F4D\u4E3A\u6BEB\u79D2",paraId:3,tocIndex:5},{value:"number",paraId:3,tocIndex:5},{value:"-",paraId:3,tocIndex:5},{value:"\u53C2\u6570",paraId:4,tocIndex:6},{value:"\u8BF4\u660E",paraId:4,tocIndex:6},{value:"\u7C7B\u578B",paraId:4,tocIndex:6},{value:"run",paraId:4,tocIndex:6},{value:"\u89E6\u53D1\u6267\u884C fn\uFF0C\u51FD\u6570\u53C2\u6570\u5C06\u4F1A\u4F20\u9012\u7ED9 fn",paraId:4,tocIndex:6},{value:"(...args: any[]) => any",paraId:4,tocIndex:6},{value:"cancel",paraId:4,tocIndex:6},{value:"\u53D6\u6D88\u5F53\u524D\u9632\u6296",paraId:4,tocIndex:6},{value:"() => void",paraId:4,tocIndex:6},{value:"flush",paraId:4,tocIndex:6},{value:"\u7ACB\u5373\u8C03\u7528\u5F53\u524D\u9632\u6296\u51FD\u6570",paraId:4,tocIndex:6},{value:"() => void",paraId:4,tocIndex:6}],K={"packages-hooks-src-use-latest-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,29638))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-latest-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(85782).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}}},w={title:"useLatest",toc:"menu",filename:"packages/hooks/src/useLatest/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u8FD4\u56DE\u5F53\u524D\u6700\u65B0\u503C\u7684 Hook\uFF0C\u53EF\u4EE5\u907F\u514D\u95ED\u5305\u95EE\u9898\u3002"},H=[{id:"uselatest",depth:1,title:"useLatest"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"}],$=[{value:"\u8FD4\u56DE\u5F53\u524D\u6700\u65B0\u503C\u7684 Hook\uFF0C\u53EF\u4EE5\u907F\u514D\u95ED\u5305\u95EE\u9898\u3002",paraId:0,tocIndex:0},{value:`const latestValueRef = useLatest(value: T): MutableRefObject; +`,paraId:1,tocIndex:3}],Q={"packages-hooks-src-use-memoized-fn-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,1912))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-memoized-fn-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(48521).Z},react:{type:"NPM",value:"18.2.0"},antd:{type:"NPM",value:"5.9.3"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}},"packages-hooks-src-use-memoized-fn-demo-example2":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,30076))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-memoized-fn-demo-example2",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(30267).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},ee={title:"useMemoizedFn",toc:"menu",filename:"packages/hooks/src/useMemoizedFn/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u6301\u4E45\u5316 function \u7684 Hook\uFF0C\u7406\u8BBA\u4E0A\uFF0C\u53EF\u4EE5\u4F7F\u7528 useMemoizedFn \u5B8C\u5168\u4EE3\u66FF useCallback\u3002"},Oe=[{id:"usememoizedfn",depth:1,title:"useMemoizedFn"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"\u6027\u80FD\u63D0\u5347",depth:3,title:"\u6027\u80FD\u63D0\u5347"},{id:"api",depth:2,title:"API"},{id:"result",depth:3,title:"Result"},{id:"params",depth:3,title:"Params"}],Be=[{value:"\u6301\u4E45\u5316 function \u7684 Hook\uFF0C\u7406\u8BBA\u4E0A\uFF0C\u53EF\u4EE5\u4F7F\u7528 useMemoizedFn \u5B8C\u5168\u4EE3\u66FF useCallback\u3002",paraId:0,tocIndex:0},{value:"\u5728\u67D0\u4E9B\u573A\u666F\u4E2D\uFF0C\u6211\u4EEC\u9700\u8981\u4F7F\u7528 useCallback \u6765\u8BB0\u4F4F\u4E00\u4E2A\u51FD\u6570\uFF0C\u4F46\u662F\u5728\u7B2C\u4E8C\u4E2A\u53C2\u6570 deps \u53D8\u5316\u65F6\uFF0C\u4F1A\u91CD\u65B0\u751F\u6210\u51FD\u6570\uFF0C\u5BFC\u81F4\u51FD\u6570\u5730\u5740\u53D8\u5316\u3002",paraId:1,tocIndex:0},{value:`const [state, setState] = useState(''); // \u5728 state \u53D8\u5316\u65F6\uFF0Cfunc \u5730\u5740\u4F1A\u53D8\u5316 const func = useCallback(() => { @@ -79,13 +79,13 @@ const func = useMemoizedFn(() => { console.log(state); }); `,paraId:4,tocIndex:0},{value:`const fn = useMemoizedFn(fn: T): T; -`,paraId:5,tocIndex:4},{value:"\u53C2\u6570",paraId:6,tocIndex:5},{value:"\u8BF4\u660E",paraId:6,tocIndex:5},{value:"\u7C7B\u578B",paraId:6,tocIndex:5},{value:"fn",paraId:6,tocIndex:5},{value:"\u5F15\u7528\u5730\u5740\u6C38\u8FDC\u4E0D\u4F1A\u53D8\u5316\u7684 fn",paraId:6,tocIndex:5},{value:"(...args: any[]) => any",paraId:6,tocIndex:5},{value:"\u53C2\u6570",paraId:7,tocIndex:6},{value:"\u8BF4\u660E",paraId:7,tocIndex:6},{value:"\u7C7B\u578B",paraId:7,tocIndex:6},{value:"\u9ED8\u8BA4\u503C",paraId:7,tocIndex:6},{value:"fn",paraId:7,tocIndex:6},{value:"\u9700\u8981\u6301\u4E45\u5316\u7684\u51FD\u6570",paraId:7,tocIndex:6},{value:"(...args: any[]) => any",paraId:7,tocIndex:6},{value:"-",paraId:7,tocIndex:6}],Xe={"packages-hooks-src-use-mount-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,49026))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-mount-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(73986).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},Ye={title:"useMount",toc:"menu",filename:"packages/hooks/src/useMount/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u53EA\u5728\u7EC4\u4EF6\u521D\u59CB\u5316\u65F6\u6267\u884C\u7684 Hook\u3002"},$e=[{id:"usemount",depth:1,title:"useMount"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"\u53C2\u6570",depth:3,title:"\u53C2\u6570"}],Qe=[{value:"\u53EA\u5728\u7EC4\u4EF6\u521D\u59CB\u5316\u65F6\u6267\u884C\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`useMount(fn: () => void); -`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"fn",paraId:2,tocIndex:4},{value:"\u521D\u59CB\u5316\u65F6\u6267\u884C\u7684\u51FD\u6570",paraId:2,tocIndex:4},{value:"() => void",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4}],ne={"packages-hooks-src-use-os-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,70989))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-os-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(28826).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}}},le={title:"useOs",toc:"menu",filename:"packages/hooks/src/useOs/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u8BE5\u81EA\u5B9A\u4E49 Hook \u7528\u4E8E\u83B7\u53D6\u7528\u6237\u64CD\u4F5C\u7CFB\u7EDF\u7684\u4FE1\u606F\u3002"},me=[{id:"useos",depth:1,title:"useOs"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"\u53C2\u6570",depth:3,title:"\u53C2\u6570"},{id:"returntype",depth:3,title:"ReturnType"},{id:"\u53C2\u6570-1",depth:3,title:"\u53C2\u6570"}],ye=[{value:"\u8BE5\u81EA\u5B9A\u4E49 Hook \u7528\u4E8E\u83B7\u53D6\u7528\u6237\u64CD\u4F5C\u7CFB\u7EDF\u7684\u4FE1\u606F\u3002",paraId:0,tocIndex:0},{value:"\u53C2\u6570",paraId:1,tocIndex:3},{value:"\u8BF4\u660E",paraId:1,tocIndex:3},{value:"\u7C7B\u578B",paraId:1,tocIndex:3},{value:"\u9ED8\u8BA4\u503C",paraId:1,tocIndex:3},{value:"options",paraId:1,tocIndex:3},{value:"\u5F53\u8BBE\u7F6E\u4E3A true \u65F6\uFF0C\u5728\u7EC4\u4EF6\u6302\u8F7D\u65F6\u6216\u8005\u6D4F\u89C8\u5668\u73AF\u5883\u53D1\u751F\u53D8\u5316\u65F6\u4F1A\u91CD\u65B0\u83B7\u53D6\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u606F\uFF0C\u9ED8\u8BA4\u4E3A true\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A false\uFF0C\u5219\u5728\u7EC4\u4EF6\u6302\u8F7D\u65F6\u53EA\u83B7\u53D6\u4E00\u6B21\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u606F",paraId:1,tocIndex:3},{value:"{ getValueInEffect: boolean }",paraId:1,tocIndex:3},{value:"{ getValueInEffect = true }",paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:5},{value:"\u8BF4\u660E",paraId:2,tocIndex:5},{value:"\u7C7B\u578B",paraId:2,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:5},{value:"OS",paraId:2,tocIndex:5},{value:"\u5F53\u524D\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u606F",paraId:2,tocIndex:5},{value:"OS: 'undetermined' | 'macos' | 'ios' | 'windows' | 'android' | 'linux'",paraId:2,tocIndex:5},{value:"-",paraId:2,tocIndex:5}],Te={"packages-hooks-src-use-set-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,37524))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-set-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(23304).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},se={title:"useSet",toc:"menu",filename:"packages/hooks/src/useSet/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u7BA1\u7406 Set \u7C7B\u578B\u72B6\u6001\u7684 Hook\u3002"},pe=[{id:"useset",depth:1,title:"useSet"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"api",depth:2,title:"API"},{id:"result",depth:3,title:"Result"},{id:"params",depth:3,title:"Params"}],Ie=[{value:"\u7BA1\u7406 Set \u7C7B\u578B\u72B6\u6001\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`const [set, { add, remove, reset }] = useSet(initialValue); -`,paraId:1,tocIndex:2},{value:"\u53C2\u6570",paraId:2,tocIndex:3},{value:"\u8BF4\u660E",paraId:2,tocIndex:3},{value:"\u7C7B\u578B",paraId:2,tocIndex:3},{value:"set",paraId:2,tocIndex:3},{value:"Set \u5BF9\u8C61",paraId:2,tocIndex:3},{value:"Set",paraId:2,tocIndex:3},{value:"add",paraId:2,tocIndex:3},{value:"\u6DFB\u52A0\u5143\u7D20",paraId:2,tocIndex:3},{value:"(key: K) => void",paraId:2,tocIndex:3},{value:"remove",paraId:2,tocIndex:3},{value:"\u79FB\u9664\u5143\u7D20",paraId:2,tocIndex:3},{value:"(key: K) => void",paraId:2,tocIndex:3},{value:"reset",paraId:2,tocIndex:3},{value:"\u91CD\u7F6E\u4E3A\u9ED8\u8BA4\u503C",paraId:2,tocIndex:3},{value:"() => void",paraId:2,tocIndex:3},{value:"\u53C2\u6570",paraId:3,tocIndex:4},{value:"\u8BF4\u660E",paraId:3,tocIndex:4},{value:"\u7C7B\u578B",paraId:3,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:4},{value:"initialValue",paraId:3,tocIndex:4},{value:"\u53EF\u9009\u9879\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684 Set \u53C2\u6570",paraId:3,tocIndex:4},{value:"Iterable",paraId:3,tocIndex:4},{value:"-",paraId:3,tocIndex:4}],_e={"packages-hooks-src-use-title-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,79799))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-title-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(44043).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}}},Ge={title:"useTitle",toc:"menu",filename:"packages/hooks/src/useTitle/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u7528\u4E8E\u8BBE\u7F6E\u9875\u9762\u6807\u9898\u3002"},mt=[{id:"usetitle",depth:1,title:"useTitle"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"options",depth:3,title:"Options"}],lt=[{value:"\u7528\u4E8E\u8BBE\u7F6E\u9875\u9762\u6807\u9898\u3002",paraId:0,tocIndex:0},{value:`useTitle(title: string, options?: Options); -`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"title",paraId:2,tocIndex:4},{value:"\u9875\u9762\u6807\u9898",paraId:2,tocIndex:4},{value:"string",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:5},{value:"restoreOnUnmount",paraId:3,tocIndex:5},{value:"\u7EC4\u4EF6\u5378\u8F7D\u65F6\uFF0C\u662F\u5426\u6062\u590D\u4E0A\u4E00\u4E2A\u9875\u9762\u6807\u9898",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"false",paraId:3,tocIndex:5}],pt={"packages-hooks-src-use-toggle-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,4609))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-toggle-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(61399).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}},"packages-hooks-src-use-toggle-demo-example2":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,30721))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-toggle-demo-example2",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(84266).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},At={title:"useToggle",toc:"menu",filename:"packages/hooks/src/useToggle/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u8FDB\u884C\u503C\u5207\u6362\u7684\u57FA\u7840 hook"},Pe=[{id:"usetoggle",depth:1,title:"useToggle"},{id:"\u57FA\u7840\u4F7F\u7528",depth:2,title:"\u57FA\u7840\u4F7F\u7528"},{id:"\u4E24\u4E2A\u503C\u5207\u6362\u4EE5\u53CA\u8BBE\u7F6E\u6307\u5B9A\u503C",depth:2,title:"\u4E24\u4E2A\u503C\u5207\u6362\u4EE5\u53CA\u8BBE\u7F6E\u6307\u5B9A\u503C"},{id:"params",depth:3,title:"Params"},{id:"result",depth:3,title:"Result"},{id:"actions",depth:3,title:"Actions"}],Ne=[{value:"\u8FDB\u884C\u503C\u5207\u6362\u7684\u57FA\u7840 hook",paraId:0,tocIndex:0},{value:"\u53C2\u6570",paraId:1,tocIndex:3},{value:"\u8BF4\u660E",paraId:1,tocIndex:3},{value:"\u7C7B\u578B",paraId:1,tocIndex:3},{value:"\u9ED8\u8BA4\u503C",paraId:1,tocIndex:3},{value:"defaultValue",paraId:1,tocIndex:3},{value:"\u53EF\u9009\u9879\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:1,tocIndex:3},{value:"T",paraId:1,tocIndex:3},{value:"false",paraId:1,tocIndex:3},{value:"reverseValue",paraId:1,tocIndex:3},{value:"\u53EF\u9009\u9879\uFF0C\u4F20\u5165\u53D6\u53CD\u7684\u72B6\u6001\u503C",paraId:1,tocIndex:3},{value:"U",paraId:1,tocIndex:3},{value:"-",paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"state",paraId:2,tocIndex:4},{value:"\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"actions",paraId:2,tocIndex:4},{value:"\u64CD\u4F5C\u96C6\u5408",paraId:2,tocIndex:4},{value:"Actions",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"toggle",paraId:3,tocIndex:5},{value:"\u5207\u6362 state",paraId:3,tocIndex:5},{value:"ToggleFn: () => void",paraId:3,tocIndex:5},{value:"set",paraId:3,tocIndex:5},{value:"\u4FEE\u6539 state",paraId:3,tocIndex:5},{value:"(state: T | U) => void",paraId:3,tocIndex:5},{value:"setLeft",paraId:3,tocIndex:5},{value:"\u8BBE\u7F6E\u4E3A defaultValue",paraId:3,tocIndex:5},{value:"ToggleFn",paraId:3,tocIndex:5},{value:"setRight",paraId:3,tocIndex:5},{value:"\u5982\u679C\u4F20\u5165\u4E86 reverseValue, \u5219\u8BBE\u7F6E\u4E3A reverseValue\u3002 \u5426\u5219\u8BBE\u7F6E\u4E3A defaultValue \u7684\u53CD\u503C",paraId:3,tocIndex:5},{value:"ToggleFn",paraId:3,tocIndex:5}],We={"packages-hooks-src-use-unmount-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,30058))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-unmount-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(15471).Z},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"},react:{type:"NPM",value:"18.2.0"}}}}},g={title:"useUnmount",toc:"menu",filename:"packages/hooks/src/useUnmount/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u5728\u7EC4\u4EF6\u5378\u8F7D\uFF08unmount\uFF09\u65F6\u6267\u884C\u7684 Hook\u3002"},V=[{id:"useunmount",depth:1,title:"useUnmount"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"\u53C2\u6570",depth:3,title:"\u53C2\u6570"}],he=[{value:"\u5728\u7EC4\u4EF6\u5378\u8F7D\uFF08unmount\uFF09\u65F6\u6267\u884C\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`useUnmount(fn: () => void); -`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"fn",paraId:2,tocIndex:4},{value:"\u7EC4\u4EF6\u5378\u8F7D\u65F6\u6267\u884C\u7684\u51FD\u6570",paraId:2,tocIndex:4},{value:"() => void",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4}],Ee={"packages-hooks-src-use-unmount-ref-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,45478))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-unmount-ref-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(8869).Z},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"},react:{type:"NPM",value:"18.2.0"}}}}},ke={title:"useUnmountedRef",toc:"menu",filename:"packages/hooks/src/useUnmountRef/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"\u83B7\u53D6\u5F53\u524D\u7EC4\u4EF6\u662F\u5426\u5DF2\u7ECF\u5378\u8F7D\u7684 Hook\u3002"},Le=[{id:"useunmountedref",depth:1,title:"useUnmountedRef"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"result",depth:3,title:"Result"}],be=[{value:"\u83B7\u53D6\u5F53\u524D\u7EC4\u4EF6\u662F\u5426\u5DF2\u7ECF\u5378\u8F7D\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`const unmountRef: { current: boolean } = useUnmountedRef(); -`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"unmountRef",paraId:2,tocIndex:4},{value:"\u7EC4\u4EF6\u662F\u5426\u5DF2\u7ECF\u5378\u8F7D",paraId:2,tocIndex:4},{value:"{ current: boolean }",paraId:2,tocIndex:4}],Ve={"packages-hooks-src-use-update-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,80019))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-update-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(85606).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},at={title:"useUpdate",toc:"menu",filename:"packages/hooks/src/useUpdate/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},description:"useUpdate \u4F1A\u8FD4\u56DE\u4E00\u4E2A\u51FD\u6570\uFF0C\u8C03\u7528\u8BE5\u51FD\u6570\u4F1A\u5F3A\u5236\u7EC4\u4EF6\u91CD\u65B0\u6E32\u67D3\u3002"},et=[{id:"useupdate",depth:1,title:"useUpdate"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"}],St=[{value:"useUpdate \u4F1A\u8FD4\u56DE\u4E00\u4E2A\u51FD\u6570\uFF0C\u8C03\u7528\u8BE5\u51FD\u6570\u4F1A\u5F3A\u5236\u7EC4\u4EF6\u91CD\u65B0\u6E32\u67D3\u3002",paraId:0,tocIndex:0},{value:`const update = useUpdate(); -`,paraId:1,tocIndex:3}],Se={"packages-hooks-src-use-request-doc-basic-demo-default":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,48716))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-default",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(12756).Z},"etc-hooks":{type:"NPM",value:"0.4.2"},mockjs:{type:"NPM",value:"1.1.0"},react:{type:"NPM",value:"18.2.0"}},title:"\u8BFB\u53D6\u7528\u6237\u540D\u79F0"}},"packages-hooks-src-use-request-doc-basic-demo-manual-run":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,31033))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-manual-run",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(83451).Z},react:{type:"NPM",value:"18.2.0"},antd:{type:"NPM",value:"5.9.3"},"etc-hooks":{type:"NPM",value:"0.4.2"}},title:"\u4FEE\u6539\u7528\u6237\u540D"}},"packages-hooks-src-use-request-doc-basic-demo-manual-runasync":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,61955))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-manual-runasync",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(84699).Z},antd:{type:"NPM",value:"5.9.3"},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"}},title:"\u4FEE\u6539\u7528\u6237\u540D"}},"packages-hooks-src-use-request-doc-basic-demo-lifecycle":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,29112))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-lifecycle",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(97358).Z},react:{type:"NPM",value:"18.2.0"},antd:{type:"NPM",value:"5.9.3"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}},"packages-hooks-src-use-request-doc-basic-demo-refresh":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,32880))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-refresh",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(49306).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},mockjs:{type:"NPM",value:"1.1.0"},antd:{type:"NPM",value:"5.9.3"}},title:"\u5237\u65B0\u7528\u6237\u540D\u79F0"}},"packages-hooks-src-use-request-doc-basic-demo-mutate":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,4799))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-mutate",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(73204).Z},antd:{type:"NPM",value:"5.9.3"},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},mockjs:{type:"NPM",value:"1.1.0"}},title:"\u4FEE\u6539\u7528\u6237\u540D"}},"packages-hooks-src-use-request-doc-basic-demo-cancel":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,76948))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-cancel",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(36631).Z},antd:{type:"NPM",value:"5.9.3"},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}},"packages-hooks-src-use-request-doc-basic-demo-params":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,13653))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-params",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(15307).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},mockjs:{type:"NPM",value:"1.1.0"},antd:{type:"NPM",value:"5.9.3"}}}}},De={title:"\u57FA\u7840\u7528\u6CD5",toc:"menu",filename:"packages/hooks/src/useRequest/doc/basic/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},group:{path:"/use-request"},description:"\u4ECB\u7ECD useRequest \u6700\u6838\u5FC3\uFF0C\u6700\u57FA\u7840\u7684\u80FD\u529B\uFF0C\u4E5F\u5C31\u662F useRequest \u5185\u6838\u7684\u80FD\u529B\u3002"},Fe=[{id:"\u57FA\u7840\u7528\u6CD5",depth:1,title:"\u57FA\u7840\u7528\u6CD5"},{id:"\u9ED8\u8BA4\u8BF7\u6C42",depth:2,title:"\u9ED8\u8BA4\u8BF7\u6C42"},{id:"packages-hooks-src-use-request-doc-basic-demo-default",depth:3,title:"\u8BFB\u53D6\u7528\u6237\u540D\u79F0"},{id:"\u624B\u52A8\u89E6\u53D1",depth:2,title:"\u624B\u52A8\u89E6\u53D1"},{id:"packages-hooks-src-use-request-doc-basic-demo-manual-run",depth:3,title:"\u4FEE\u6539\u7528\u6237\u540D"},{id:"packages-hooks-src-use-request-doc-basic-demo-manual-runasync",depth:3,title:"\u4FEE\u6539\u7528\u6237\u540D"},{id:"\u751F\u547D\u5468\u671F",depth:2,title:"\u751F\u547D\u5468\u671F"},{id:"\u5237\u65B0\u91CD\u590D\u4E0A\u4E00\u6B21\u8BF7\u6C42",depth:2,title:"\u5237\u65B0\uFF08\u91CD\u590D\u4E0A\u4E00\u6B21\u8BF7\u6C42\uFF09"},{id:"packages-hooks-src-use-request-doc-basic-demo-refresh",depth:3,title:"\u5237\u65B0\u7528\u6237\u540D\u79F0"},{id:"\u7ACB\u5373\u53D8\u66F4\u6570\u636E",depth:2,title:"\u7ACB\u5373\u53D8\u66F4\u6570\u636E"},{id:"packages-hooks-src-use-request-doc-basic-demo-mutate",depth:3,title:"\u4FEE\u6539\u7528\u6237\u540D"},{id:"\u53D6\u6D88\u54CD\u5E94",depth:2,title:"\u53D6\u6D88\u54CD\u5E94"},{id:"\u53C2\u6570\u7BA1\u7406",depth:2,title:"\u53C2\u6570\u7BA1\u7406"},{id:"api",depth:2,title:"API"},{id:"result",depth:3,title:"Result"},{id:"options",depth:3,title:"Options"}],Re=[{value:"\u4ECB\u7ECD ",paraId:0,tocIndex:0},{value:"useRequest",paraId:0,tocIndex:0},{value:" \u6700\u6838\u5FC3\uFF0C\u6700\u57FA\u7840\u7684\u80FD\u529B\uFF0C\u4E5F\u5C31\u662F ",paraId:0,tocIndex:0},{value:"useRequest",paraId:0,tocIndex:0},{value:" \u5185\u6838\u7684\u80FD\u529B\u3002",paraId:0,tocIndex:0},{value:"\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C",paraId:1,tocIndex:1},{value:"useRequest",paraId:1,tocIndex:1},{value:" \u7B2C\u4E00\u4E2A\u53C2\u6570\u662F\u4E00\u4E2A\u5F02\u6B65\u51FD\u6570\uFF0C\u5728\u7EC4\u4EF6\u521D\u59CB\u5316\u65F6\uFF0C\u4F1A\u81EA\u52A8\u6267\u884C\u8BE5\u5F02\u6B65\u51FD\u6570\u3002\u540C\u65F6\u81EA\u52A8\u7BA1\u7406\u8BE5\u5F02\u6B65\u51FD\u6570\u7684 ",paraId:1,tocIndex:1},{value:"loading",paraId:1,tocIndex:1},{value:" , ",paraId:1,tocIndex:1},{value:"data",paraId:1,tocIndex:1},{value:" , ",paraId:1,tocIndex:1},{value:"error",paraId:1,tocIndex:1},{value:" \u7B49\u72B6\u6001\u3002",paraId:1,tocIndex:1},{value:`const { data, error, loading } = useRequest(service); +`,paraId:5,tocIndex:4},{value:"\u53C2\u6570",paraId:6,tocIndex:5},{value:"\u8BF4\u660E",paraId:6,tocIndex:5},{value:"\u7C7B\u578B",paraId:6,tocIndex:5},{value:"fn",paraId:6,tocIndex:5},{value:"\u5F15\u7528\u5730\u5740\u6C38\u8FDC\u4E0D\u4F1A\u53D8\u5316\u7684 fn",paraId:6,tocIndex:5},{value:"(...args: any[]) => any",paraId:6,tocIndex:5},{value:"\u53C2\u6570",paraId:7,tocIndex:6},{value:"\u8BF4\u660E",paraId:7,tocIndex:6},{value:"\u7C7B\u578B",paraId:7,tocIndex:6},{value:"\u9ED8\u8BA4\u503C",paraId:7,tocIndex:6},{value:"fn",paraId:7,tocIndex:6},{value:"\u9700\u8981\u6301\u4E45\u5316\u7684\u51FD\u6570",paraId:7,tocIndex:6},{value:"(...args: any[]) => any",paraId:7,tocIndex:6},{value:"-",paraId:7,tocIndex:6}],Xe={"packages-hooks-src-use-mount-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,49026))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-mount-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(73986).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},Ye={title:"useMount",toc:"menu",filename:"packages/hooks/src/useMount/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u53EA\u5728\u7EC4\u4EF6\u521D\u59CB\u5316\u65F6\u6267\u884C\u7684 Hook\u3002"},$e=[{id:"usemount",depth:1,title:"useMount"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"\u53C2\u6570",depth:3,title:"\u53C2\u6570"}],Qe=[{value:"\u53EA\u5728\u7EC4\u4EF6\u521D\u59CB\u5316\u65F6\u6267\u884C\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`useMount(fn: () => void); +`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"fn",paraId:2,tocIndex:4},{value:"\u521D\u59CB\u5316\u65F6\u6267\u884C\u7684\u51FD\u6570",paraId:2,tocIndex:4},{value:"() => void",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4}],ne={"packages-hooks-src-use-os-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,70989))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-os-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(28826).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}}},le={title:"useOs",toc:"menu",filename:"packages/hooks/src/useOs/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u8BE5\u81EA\u5B9A\u4E49 Hook \u7528\u4E8E\u83B7\u53D6\u7528\u6237\u64CD\u4F5C\u7CFB\u7EDF\u7684\u4FE1\u606F\u3002"},me=[{id:"useos",depth:1,title:"useOs"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"\u53C2\u6570",depth:3,title:"\u53C2\u6570"},{id:"returntype",depth:3,title:"ReturnType"},{id:"\u53C2\u6570-1",depth:3,title:"\u53C2\u6570"}],ye=[{value:"\u8BE5\u81EA\u5B9A\u4E49 Hook \u7528\u4E8E\u83B7\u53D6\u7528\u6237\u64CD\u4F5C\u7CFB\u7EDF\u7684\u4FE1\u606F\u3002",paraId:0,tocIndex:0},{value:"\u53C2\u6570",paraId:1,tocIndex:3},{value:"\u8BF4\u660E",paraId:1,tocIndex:3},{value:"\u7C7B\u578B",paraId:1,tocIndex:3},{value:"\u9ED8\u8BA4\u503C",paraId:1,tocIndex:3},{value:"options",paraId:1,tocIndex:3},{value:"\u5F53\u8BBE\u7F6E\u4E3A true \u65F6\uFF0C\u5728\u7EC4\u4EF6\u6302\u8F7D\u65F6\u6216\u8005\u6D4F\u89C8\u5668\u73AF\u5883\u53D1\u751F\u53D8\u5316\u65F6\u4F1A\u91CD\u65B0\u83B7\u53D6\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u606F\uFF0C\u9ED8\u8BA4\u4E3A true\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A false\uFF0C\u5219\u5728\u7EC4\u4EF6\u6302\u8F7D\u65F6\u53EA\u83B7\u53D6\u4E00\u6B21\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u606F",paraId:1,tocIndex:3},{value:"{ getValueInEffect: boolean }",paraId:1,tocIndex:3},{value:"{ getValueInEffect = true }",paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:5},{value:"\u8BF4\u660E",paraId:2,tocIndex:5},{value:"\u7C7B\u578B",paraId:2,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:5},{value:"OS",paraId:2,tocIndex:5},{value:"\u5F53\u524D\u7684\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u606F",paraId:2,tocIndex:5},{value:"OS: 'undetermined' | 'macos' | 'ios' | 'windows' | 'android' | 'linux'",paraId:2,tocIndex:5},{value:"-",paraId:2,tocIndex:5}],Te={"packages-hooks-src-use-set-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,37524))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-set-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(23304).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},se={title:"useSet",toc:"menu",filename:"packages/hooks/src/useSet/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u7BA1\u7406 Set \u7C7B\u578B\u72B6\u6001\u7684 Hook\u3002"},pe=[{id:"useset",depth:1,title:"useSet"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"api",depth:2,title:"API"},{id:"result",depth:3,title:"Result"},{id:"params",depth:3,title:"Params"}],Ie=[{value:"\u7BA1\u7406 Set \u7C7B\u578B\u72B6\u6001\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`const [set, { add, remove, reset }] = useSet(initialValue); +`,paraId:1,tocIndex:2},{value:"\u53C2\u6570",paraId:2,tocIndex:3},{value:"\u8BF4\u660E",paraId:2,tocIndex:3},{value:"\u7C7B\u578B",paraId:2,tocIndex:3},{value:"set",paraId:2,tocIndex:3},{value:"Set \u5BF9\u8C61",paraId:2,tocIndex:3},{value:"Set",paraId:2,tocIndex:3},{value:"add",paraId:2,tocIndex:3},{value:"\u6DFB\u52A0\u5143\u7D20",paraId:2,tocIndex:3},{value:"(key: K) => void",paraId:2,tocIndex:3},{value:"remove",paraId:2,tocIndex:3},{value:"\u79FB\u9664\u5143\u7D20",paraId:2,tocIndex:3},{value:"(key: K) => void",paraId:2,tocIndex:3},{value:"reset",paraId:2,tocIndex:3},{value:"\u91CD\u7F6E\u4E3A\u9ED8\u8BA4\u503C",paraId:2,tocIndex:3},{value:"() => void",paraId:2,tocIndex:3},{value:"\u53C2\u6570",paraId:3,tocIndex:4},{value:"\u8BF4\u660E",paraId:3,tocIndex:4},{value:"\u7C7B\u578B",paraId:3,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:4},{value:"initialValue",paraId:3,tocIndex:4},{value:"\u53EF\u9009\u9879\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684 Set \u53C2\u6570",paraId:3,tocIndex:4},{value:"Iterable",paraId:3,tocIndex:4},{value:"-",paraId:3,tocIndex:4}],_e={"packages-hooks-src-use-title-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,79799))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-title-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(44043).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}}},Ge={title:"useTitle",toc:"menu",filename:"packages/hooks/src/useTitle/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u7528\u4E8E\u8BBE\u7F6E\u9875\u9762\u6807\u9898\u3002"},mt=[{id:"usetitle",depth:1,title:"useTitle"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"params",depth:3,title:"Params"},{id:"options",depth:3,title:"Options"}],lt=[{value:"\u7528\u4E8E\u8BBE\u7F6E\u9875\u9762\u6807\u9898\u3002",paraId:0,tocIndex:0},{value:`useTitle(title: string, options?: Options); +`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"title",paraId:2,tocIndex:4},{value:"\u9875\u9762\u6807\u9898",paraId:2,tocIndex:4},{value:"string",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"\u9ED8\u8BA4\u503C",paraId:3,tocIndex:5},{value:"restoreOnUnmount",paraId:3,tocIndex:5},{value:"\u7EC4\u4EF6\u5378\u8F7D\u65F6\uFF0C\u662F\u5426\u6062\u590D\u4E0A\u4E00\u4E2A\u9875\u9762\u6807\u9898",paraId:3,tocIndex:5},{value:"boolean",paraId:3,tocIndex:5},{value:"false",paraId:3,tocIndex:5}],pt={"packages-hooks-src-use-toggle-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,4609))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-toggle-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(61399).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}},"packages-hooks-src-use-toggle-demo-example2":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,30721))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-toggle-demo-example2",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(84266).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},At={title:"useToggle",toc:"menu",filename:"packages/hooks/src/useToggle/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u8FDB\u884C\u503C\u5207\u6362\u7684\u57FA\u7840 hook"},Pe=[{id:"usetoggle",depth:1,title:"useToggle"},{id:"\u57FA\u7840\u4F7F\u7528",depth:2,title:"\u57FA\u7840\u4F7F\u7528"},{id:"\u4E24\u4E2A\u503C\u5207\u6362\u4EE5\u53CA\u8BBE\u7F6E\u6307\u5B9A\u503C",depth:2,title:"\u4E24\u4E2A\u503C\u5207\u6362\u4EE5\u53CA\u8BBE\u7F6E\u6307\u5B9A\u503C"},{id:"params",depth:3,title:"Params"},{id:"result",depth:3,title:"Result"},{id:"actions",depth:3,title:"Actions"}],Ne=[{value:"\u8FDB\u884C\u503C\u5207\u6362\u7684\u57FA\u7840 hook",paraId:0,tocIndex:0},{value:"\u53C2\u6570",paraId:1,tocIndex:3},{value:"\u8BF4\u660E",paraId:1,tocIndex:3},{value:"\u7C7B\u578B",paraId:1,tocIndex:3},{value:"\u9ED8\u8BA4\u503C",paraId:1,tocIndex:3},{value:"defaultValue",paraId:1,tocIndex:3},{value:"\u53EF\u9009\u9879\uFF0C\u4F20\u5165\u9ED8\u8BA4\u7684\u72B6\u6001\u503C",paraId:1,tocIndex:3},{value:"T",paraId:1,tocIndex:3},{value:"false",paraId:1,tocIndex:3},{value:"reverseValue",paraId:1,tocIndex:3},{value:"\u53EF\u9009\u9879\uFF0C\u4F20\u5165\u53D6\u53CD\u7684\u72B6\u6001\u503C",paraId:1,tocIndex:3},{value:"U",paraId:1,tocIndex:3},{value:"-",paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"state",paraId:2,tocIndex:4},{value:"\u72B6\u6001\u503C",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4},{value:"actions",paraId:2,tocIndex:4},{value:"\u64CD\u4F5C\u96C6\u5408",paraId:2,tocIndex:4},{value:"Actions",paraId:2,tocIndex:4},{value:"\u53C2\u6570",paraId:3,tocIndex:5},{value:"\u8BF4\u660E",paraId:3,tocIndex:5},{value:"\u7C7B\u578B",paraId:3,tocIndex:5},{value:"toggle",paraId:3,tocIndex:5},{value:"\u5207\u6362 state",paraId:3,tocIndex:5},{value:"ToggleFn: () => void",paraId:3,tocIndex:5},{value:"set",paraId:3,tocIndex:5},{value:"\u4FEE\u6539 state",paraId:3,tocIndex:5},{value:"(state: T | U) => void",paraId:3,tocIndex:5},{value:"setLeft",paraId:3,tocIndex:5},{value:"\u8BBE\u7F6E\u4E3A defaultValue",paraId:3,tocIndex:5},{value:"ToggleFn",paraId:3,tocIndex:5},{value:"setRight",paraId:3,tocIndex:5},{value:"\u5982\u679C\u4F20\u5165\u4E86 reverseValue, \u5219\u8BBE\u7F6E\u4E3A reverseValue\u3002 \u5426\u5219\u8BBE\u7F6E\u4E3A defaultValue \u7684\u53CD\u503C",paraId:3,tocIndex:5},{value:"ToggleFn",paraId:3,tocIndex:5}],We={"packages-hooks-src-use-unmount-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,30058))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-unmount-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(15471).Z},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"},react:{type:"NPM",value:"18.2.0"}}}}},g={title:"useUnmount",toc:"menu",filename:"packages/hooks/src/useUnmount/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u5728\u7EC4\u4EF6\u5378\u8F7D\uFF08unmount\uFF09\u65F6\u6267\u884C\u7684 Hook\u3002"},V=[{id:"useunmount",depth:1,title:"useUnmount"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"\u53C2\u6570",depth:3,title:"\u53C2\u6570"}],he=[{value:"\u5728\u7EC4\u4EF6\u5378\u8F7D\uFF08unmount\uFF09\u65F6\u6267\u884C\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`useUnmount(fn: () => void); +`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"\u9ED8\u8BA4\u503C",paraId:2,tocIndex:4},{value:"fn",paraId:2,tocIndex:4},{value:"\u7EC4\u4EF6\u5378\u8F7D\u65F6\u6267\u884C\u7684\u51FD\u6570",paraId:2,tocIndex:4},{value:"() => void",paraId:2,tocIndex:4},{value:"-",paraId:2,tocIndex:4}],Ee={"packages-hooks-src-use-unmount-ref-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,45478))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-unmount-ref-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(8869).Z},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"},react:{type:"NPM",value:"18.2.0"}}}}},ke={title:"useUnmountedRef",toc:"menu",filename:"packages/hooks/src/useUnmountRef/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"\u83B7\u53D6\u5F53\u524D\u7EC4\u4EF6\u662F\u5426\u5DF2\u7ECF\u5378\u8F7D\u7684 Hook\u3002"},Le=[{id:"useunmountedref",depth:1,title:"useUnmountedRef"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"},{id:"result",depth:3,title:"Result"}],be=[{value:"\u83B7\u53D6\u5F53\u524D\u7EC4\u4EF6\u662F\u5426\u5DF2\u7ECF\u5378\u8F7D\u7684 Hook\u3002",paraId:0,tocIndex:0},{value:`const unmountRef: { current: boolean } = useUnmountedRef(); +`,paraId:1,tocIndex:3},{value:"\u53C2\u6570",paraId:2,tocIndex:4},{value:"\u8BF4\u660E",paraId:2,tocIndex:4},{value:"\u7C7B\u578B",paraId:2,tocIndex:4},{value:"unmountRef",paraId:2,tocIndex:4},{value:"\u7EC4\u4EF6\u662F\u5426\u5DF2\u7ECF\u5378\u8F7D",paraId:2,tocIndex:4},{value:"{ current: boolean }",paraId:2,tocIndex:4}],Ve={"packages-hooks-src-use-update-demo-example":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,80019))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-update-demo-example",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(85606).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},antd:{type:"NPM",value:"5.9.3"}}}}},at={title:"useUpdate",toc:"menu",filename:"packages/hooks/src/useUpdate/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},description:"useUpdate \u4F1A\u8FD4\u56DE\u4E00\u4E2A\u51FD\u6570\uFF0C\u8C03\u7528\u8BE5\u51FD\u6570\u4F1A\u5F3A\u5236\u7EC4\u4EF6\u91CD\u65B0\u6E32\u67D3\u3002"},et=[{id:"useupdate",depth:1,title:"useUpdate"},{id:"\u4EE3\u7801\u6F14\u793A",depth:2,title:"\u4EE3\u7801\u6F14\u793A"},{id:"\u57FA\u7840\u7528\u6CD5",depth:3,title:"\u57FA\u7840\u7528\u6CD5"},{id:"api",depth:2,title:"API"}],St=[{value:"useUpdate \u4F1A\u8FD4\u56DE\u4E00\u4E2A\u51FD\u6570\uFF0C\u8C03\u7528\u8BE5\u51FD\u6570\u4F1A\u5F3A\u5236\u7EC4\u4EF6\u91CD\u65B0\u6E32\u67D3\u3002",paraId:0,tocIndex:0},{value:`const update = useUpdate(); +`,paraId:1,tocIndex:3}],Se={"packages-hooks-src-use-request-doc-basic-demo-default":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,48716))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-default",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(12756).Z},"etc-hooks":{type:"NPM",value:"0.4.2"},mockjs:{type:"NPM",value:"1.1.0"},react:{type:"NPM",value:"18.2.0"}},title:"\u8BFB\u53D6\u7528\u6237\u540D\u79F0"}},"packages-hooks-src-use-request-doc-basic-demo-manual-run":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,31033))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-manual-run",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(83451).Z},react:{type:"NPM",value:"18.2.0"},antd:{type:"NPM",value:"5.9.3"},"etc-hooks":{type:"NPM",value:"0.4.2"}},title:"\u4FEE\u6539\u7528\u6237\u540D"}},"packages-hooks-src-use-request-doc-basic-demo-manual-runasync":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,61955))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-manual-runasync",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(84699).Z},antd:{type:"NPM",value:"5.9.3"},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"}},title:"\u4FEE\u6539\u7528\u6237\u540D"}},"packages-hooks-src-use-request-doc-basic-demo-lifecycle":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,29112))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-lifecycle",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(97358).Z},react:{type:"NPM",value:"18.2.0"},antd:{type:"NPM",value:"5.9.3"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}},"packages-hooks-src-use-request-doc-basic-demo-refresh":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,32880))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-refresh",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(49306).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},mockjs:{type:"NPM",value:"1.1.0"},antd:{type:"NPM",value:"5.9.3"}},title:"\u5237\u65B0\u7528\u6237\u540D\u79F0"}},"packages-hooks-src-use-request-doc-basic-demo-mutate":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,4799))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-mutate",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(73204).Z},antd:{type:"NPM",value:"5.9.3"},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},mockjs:{type:"NPM",value:"1.1.0"}},title:"\u4FEE\u6539\u7528\u6237\u540D"}},"packages-hooks-src-use-request-doc-basic-demo-cancel":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,76948))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-cancel",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(36631).Z},antd:{type:"NPM",value:"5.9.3"},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"}}}},"packages-hooks-src-use-request-doc-basic-demo-params":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,13653))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-basic-demo-params",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(15307).Z},react:{type:"NPM",value:"18.2.0"},"etc-hooks":{type:"NPM",value:"0.4.2"},mockjs:{type:"NPM",value:"1.1.0"},antd:{type:"NPM",value:"5.9.3"}}}}},De={title:"\u57FA\u7840\u7528\u6CD5",toc:"menu",filename:"packages/hooks/src/useRequest/doc/basic/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},group:{path:"/use-request"},description:"\u4ECB\u7ECD useRequest \u6700\u6838\u5FC3\uFF0C\u6700\u57FA\u7840\u7684\u80FD\u529B\uFF0C\u4E5F\u5C31\u662F useRequest \u5185\u6838\u7684\u80FD\u529B\u3002"},Fe=[{id:"\u57FA\u7840\u7528\u6CD5",depth:1,title:"\u57FA\u7840\u7528\u6CD5"},{id:"\u9ED8\u8BA4\u8BF7\u6C42",depth:2,title:"\u9ED8\u8BA4\u8BF7\u6C42"},{id:"packages-hooks-src-use-request-doc-basic-demo-default",depth:3,title:"\u8BFB\u53D6\u7528\u6237\u540D\u79F0"},{id:"\u624B\u52A8\u89E6\u53D1",depth:2,title:"\u624B\u52A8\u89E6\u53D1"},{id:"packages-hooks-src-use-request-doc-basic-demo-manual-run",depth:3,title:"\u4FEE\u6539\u7528\u6237\u540D"},{id:"packages-hooks-src-use-request-doc-basic-demo-manual-runasync",depth:3,title:"\u4FEE\u6539\u7528\u6237\u540D"},{id:"\u751F\u547D\u5468\u671F",depth:2,title:"\u751F\u547D\u5468\u671F"},{id:"\u5237\u65B0\u91CD\u590D\u4E0A\u4E00\u6B21\u8BF7\u6C42",depth:2,title:"\u5237\u65B0\uFF08\u91CD\u590D\u4E0A\u4E00\u6B21\u8BF7\u6C42\uFF09"},{id:"packages-hooks-src-use-request-doc-basic-demo-refresh",depth:3,title:"\u5237\u65B0\u7528\u6237\u540D\u79F0"},{id:"\u7ACB\u5373\u53D8\u66F4\u6570\u636E",depth:2,title:"\u7ACB\u5373\u53D8\u66F4\u6570\u636E"},{id:"packages-hooks-src-use-request-doc-basic-demo-mutate",depth:3,title:"\u4FEE\u6539\u7528\u6237\u540D"},{id:"\u53D6\u6D88\u54CD\u5E94",depth:2,title:"\u53D6\u6D88\u54CD\u5E94"},{id:"\u53C2\u6570\u7BA1\u7406",depth:2,title:"\u53C2\u6570\u7BA1\u7406"},{id:"api",depth:2,title:"API"},{id:"result",depth:3,title:"Result"},{id:"options",depth:3,title:"Options"}],Re=[{value:"\u4ECB\u7ECD ",paraId:0,tocIndex:0},{value:"useRequest",paraId:0,tocIndex:0},{value:" \u6700\u6838\u5FC3\uFF0C\u6700\u57FA\u7840\u7684\u80FD\u529B\uFF0C\u4E5F\u5C31\u662F ",paraId:0,tocIndex:0},{value:"useRequest",paraId:0,tocIndex:0},{value:" \u5185\u6838\u7684\u80FD\u529B\u3002",paraId:0,tocIndex:0},{value:"\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C",paraId:1,tocIndex:1},{value:"useRequest",paraId:1,tocIndex:1},{value:" \u7B2C\u4E00\u4E2A\u53C2\u6570\u662F\u4E00\u4E2A\u5F02\u6B65\u51FD\u6570\uFF0C\u5728\u7EC4\u4EF6\u521D\u59CB\u5316\u65F6\uFF0C\u4F1A\u81EA\u52A8\u6267\u884C\u8BE5\u5F02\u6B65\u51FD\u6570\u3002\u540C\u65F6\u81EA\u52A8\u7BA1\u7406\u8BE5\u5F02\u6B65\u51FD\u6570\u7684 ",paraId:1,tocIndex:1},{value:"loading",paraId:1,tocIndex:1},{value:" , ",paraId:1,tocIndex:1},{value:"data",paraId:1,tocIndex:1},{value:" , ",paraId:1,tocIndex:1},{value:"error",paraId:1,tocIndex:1},{value:" \u7B49\u72B6\u6001\u3002",paraId:1,tocIndex:1},{value:`const { data, error, loading } = useRequest(service); `,paraId:2,tocIndex:1},{value:"\u5982\u679C\u8BBE\u7F6E\u4E86 ",paraId:3,tocIndex:3},{value:"options.manual = true",paraId:3,tocIndex:3},{value:"\uFF0C\u5219 ",paraId:3,tocIndex:3},{value:"useRequest",paraId:3,tocIndex:3},{value:" \u4E0D\u4F1A\u9ED8\u8BA4\u6267\u884C\uFF0C\u9700\u8981\u901A\u8FC7 ",paraId:3,tocIndex:3},{value:"run",paraId:3,tocIndex:3},{value:" \u6216\u8005 ",paraId:3,tocIndex:3},{value:"runAsync",paraId:3,tocIndex:3},{value:" \u6765\u89E6\u53D1\u6267\u884C\u3002",paraId:3,tocIndex:3},{value:`const { loading, run, runAsync } = useRequest(service, { manual: true, }); @@ -122,7 +122,7 @@ const func = useMemoizedFn(() => { onFinally?: (params: TParams, data?: TData, e?: Error) => void, } ); -`,paraId:26,tocIndex:13},{value:"\u53C2\u6570",paraId:27,tocIndex:14},{value:"\u8BF4\u660E",paraId:27,tocIndex:14},{value:"\u7C7B\u578B",paraId:27,tocIndex:14},{value:"data",paraId:27,tocIndex:14},{value:"service \u8FD4\u56DE\u7684\u6570\u636E",paraId:27,tocIndex:14},{value:"TData",paraId:27,tocIndex:14},{value:" | ",paraId:27,tocIndex:14},{value:"undefined",paraId:27,tocIndex:14},{value:"error",paraId:27,tocIndex:14},{value:"service \u629B\u51FA\u7684\u5F02\u5E38",paraId:27,tocIndex:14},{value:"Error",paraId:27,tocIndex:14},{value:" | ",paraId:27,tocIndex:14},{value:"undefined",paraId:27,tocIndex:14},{value:"loading",paraId:27,tocIndex:14},{value:"service \u662F\u5426\u6B63\u5728\u6267\u884C",paraId:27,tocIndex:14},{value:"boolean",paraId:27,tocIndex:14},{value:"params",paraId:27,tocIndex:14},{value:"\u5F53\u6B21\u6267\u884C\u7684 service \u7684\u53C2\u6570\u6570\u7EC4\u3002\u6BD4\u5982\u4F60\u89E6\u53D1\u4E86 ",paraId:27,tocIndex:14},{value:"run(1, 2, 3)",paraId:27,tocIndex:14},{value:"\uFF0C\u5219 params \u7B49\u4E8E ",paraId:27,tocIndex:14},{value:"[1, 2, 3]",paraId:27,tocIndex:14},{value:"TParams",paraId:27,tocIndex:14},{value:" | ",paraId:27,tocIndex:14},{value:"[]",paraId:27,tocIndex:14},{value:"run",paraId:27,tocIndex:14},{value:" \u624B\u52A8\u89E6\u53D1 service \u6267\u884C\uFF0C\u53C2\u6570\u4F1A\u4F20\u9012\u7ED9 service",paraId:28,tocIndex:14},{value:"\u5F02\u5E38\u81EA\u52A8\u5904\u7406\uFF0C\u901A\u8FC7 ",paraId:28,tocIndex:14},{value:"onError",paraId:28,tocIndex:14},{value:" \u53CD\u9988",paraId:28,tocIndex:14},{value:"(...params: TParams) => void",paraId:27,tocIndex:14},{value:"runAsync",paraId:27,tocIndex:14},{value:"\u4E0E ",paraId:27,tocIndex:14},{value:"run",paraId:27,tocIndex:14},{value:" \u7528\u6CD5\u4E00\u81F4\uFF0C\u4F46\u8FD4\u56DE\u7684\u662F Promise\uFF0C\u9700\u8981\u81EA\u884C\u5904\u7406\u5F02\u5E38\u3002",paraId:27,tocIndex:14},{value:"(...params: TParams) => Promise",paraId:27,tocIndex:14},{value:"refresh",paraId:27,tocIndex:14},{value:"\u4F7F\u7528\u4E0A\u4E00\u6B21\u7684 params\uFF0C\u91CD\u65B0\u8C03\u7528 ",paraId:27,tocIndex:14},{value:"run",paraId:27,tocIndex:14},{value:"() => void",paraId:27,tocIndex:14},{value:"refreshAsync",paraId:27,tocIndex:14},{value:"\u4F7F\u7528\u4E0A\u4E00\u6B21\u7684 params\uFF0C\u91CD\u65B0\u8C03\u7528 ",paraId:27,tocIndex:14},{value:"runAsync",paraId:27,tocIndex:14},{value:"() => Promise",paraId:27,tocIndex:14},{value:"mutate",paraId:27,tocIndex:14},{value:"\u76F4\u63A5\u4FEE\u6539 ",paraId:27,tocIndex:14},{value:"data",paraId:27,tocIndex:14},{value:"(data?: TData / ((oldData?: TData) => (TData / undefined))) => void",paraId:27,tocIndex:14},{value:"cancel",paraId:27,tocIndex:14},{value:"\u5FFD\u7565\u5F53\u524D Promise \u7684\u54CD\u5E94",paraId:27,tocIndex:14},{value:"() => void",paraId:27,tocIndex:14},{value:"\u53C2\u6570",paraId:29,tocIndex:15},{value:"\u8BF4\u660E",paraId:29,tocIndex:15},{value:"\u7C7B\u578B",paraId:29,tocIndex:15},{value:"\u9ED8\u8BA4\u503C",paraId:29,tocIndex:15},{value:"manual",paraId:29,tocIndex:15},{value:" \u9ED8\u8BA4 ",paraId:30,tocIndex:15},{value:"false",paraId:30,tocIndex:15},{value:"\u3002 \u5373\u5728\u521D\u59CB\u5316\u65F6\u81EA\u52A8\u6267\u884C service\u3002",paraId:30,tocIndex:15},{value:"\u5982\u679C\u8BBE\u7F6E\u4E3A ",paraId:30,tocIndex:15},{value:"true",paraId:30,tocIndex:15},{value:"\uFF0C\u5219\u9700\u8981\u624B\u52A8\u8C03\u7528 ",paraId:30,tocIndex:15},{value:"run",paraId:30,tocIndex:15},{value:" \u6216 ",paraId:30,tocIndex:15},{value:"runAsync",paraId:30,tocIndex:15},{value:" \u89E6\u53D1\u6267\u884C\u3002 ",paraId:30,tocIndex:15},{value:"boolean",paraId:29,tocIndex:15},{value:"false",paraId:29,tocIndex:15},{value:"defaultParams",paraId:29,tocIndex:15},{value:"\u9996\u6B21\u9ED8\u8BA4\u6267\u884C\u65F6\uFF0C\u4F20\u9012\u7ED9 service \u7684\u53C2\u6570",paraId:29,tocIndex:15},{value:"TParams",paraId:29,tocIndex:15},{value:"-",paraId:29,tocIndex:15},{value:"onBefore",paraId:29,tocIndex:15},{value:"service \u6267\u884C\u524D\u89E6\u53D1",paraId:29,tocIndex:15},{value:"(params: TParams) => void",paraId:29,tocIndex:15},{value:"-",paraId:29,tocIndex:15},{value:"onSuccess",paraId:29,tocIndex:15},{value:"service resolve \u65F6\u89E6\u53D1",paraId:29,tocIndex:15},{value:"(data: TData, params: TParams) => void",paraId:29,tocIndex:15},{value:"-",paraId:29,tocIndex:15},{value:"onError",paraId:29,tocIndex:15},{value:"service reject \u65F6\u89E6\u53D1",paraId:29,tocIndex:15},{value:"(e: Error, params: TParams) => void",paraId:29,tocIndex:15},{value:"-",paraId:29,tocIndex:15},{value:"onFinally",paraId:29,tocIndex:15},{value:"service \u6267\u884C\u5B8C\u6210\u65F6\u89E6\u53D1",paraId:29,tocIndex:15},{value:"(params: TParams, data?: TData, e?: Error) => void",paraId:29,tocIndex:15},{value:"-",paraId:29,tocIndex:15},{value:"\u4EE5\u4E0A\u662F useRequest \u6700\u57FA\u7840\u7684\u529F\u80FD",paraId:31,tocIndex:15}],rt={"packages-hooks-src-use-request-doc-index-demo-default":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,8316))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-index-demo-default",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(26056).Z},"etc-hooks":{type:"NPM",value:"0.4.2"},mockjs:{type:"NPM",value:"1.1.0"},react:{type:"NPM",value:"18.2.0"}}}},"packages-hooks-src-use-request-doc-index-demo-manual":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,47005))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-index-demo-manual",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(66962).Z},react:{type:"NPM",value:"18.2.0"},antd:{type:"NPM",value:"5.9.3"},"etc-hooks":{type:"NPM",value:"0.4.2"}},title:"\u4FEE\u6539\u7528\u6237\u540D"}}},it={title:"\u5FEB\u901F\u4E0A\u624B",toc:"menu",filename:"packages/hooks/src/useRequest/doc/index/index.md",lastUpdated:169839784e4,nav:{path:"/hooks"},group:{path:"/use-request"},description:"useRequest \u662F\u4E00\u4E2A\u5F3A\u5927\u7684\u5F02\u6B65\u6570\u636E\u7BA1\u7406\u7684 Hooks\uFF0CReact \u9879\u76EE\u4E2D\u7684\u7F51\u7EDC\u8BF7\u6C42\u573A\u666F\u4F7F\u7528 useRequest \u5C31\u591F\u4E86\u3002"},bt=[{id:"\u5FEB\u901F\u4E0A\u624B",depth:1,title:"\u5FEB\u901F\u4E0A\u624B"},{id:"\u9ED8\u8BA4\u7528\u6CD5",depth:2,title:"\u9ED8\u8BA4\u7528\u6CD5"},{id:"\u624B\u52A8\u89E6\u53D1",depth:2,title:"\u624B\u52A8\u89E6\u53D1"},{id:"packages-hooks-src-use-request-doc-index-demo-manual",depth:3,title:"\u4FEE\u6539\u7528\u6237\u540D"}],Nt=[{value:"useRequest",paraId:0,tocIndex:0},{value:" \u662F\u4E00\u4E2A\u5F3A\u5927\u7684\u5F02\u6B65\u6570\u636E\u7BA1\u7406\u7684 Hooks\uFF0CReact \u9879\u76EE\u4E2D\u7684\u7F51\u7EDC\u8BF7\u6C42\u573A\u666F\u4F7F\u7528 ",paraId:0,tocIndex:0},{value:"useRequest",paraId:0,tocIndex:0},{value:" \u5C31\u591F\u4E86\u3002",paraId:0,tocIndex:0},{value:"useRequest",paraId:1,tocIndex:0},{value:" \u901A\u8FC7\u63D2\u4EF6\u5F0F\u7EC4\u7EC7\u4EE3\u7801\uFF0C\u6838\u5FC3\u4EE3\u7801\u6781\u5176\u7B80\u5355\uFF0C\u5E76\u4E14\u53EF\u4EE5\u5F88\u65B9\u4FBF\u7684\u6269\u5C55\u51FA\u66F4\u9AD8\u7EA7\u7684\u529F\u80FD\u3002\u76EE\u524D\u5DF2\u6709\u80FD\u529B\u5305\u62EC\uFF1A",paraId:1,tocIndex:0},{value:"\u81EA\u52A8\u8BF7\u6C42/\u624B\u52A8\u8BF7\u6C42",paraId:2,tocIndex:0},{value:"\u8F6E\u8BE2",paraId:2,tocIndex:0},{value:"\u9632\u6296",paraId:2,tocIndex:0},{value:"\u8282\u6D41",paraId:2,tocIndex:0},{value:"\u5C4F\u5E55\u805A\u7126\u91CD\u65B0\u8BF7\u6C42",paraId:2,tocIndex:0},{value:"\u9519\u8BEF\u91CD\u8BD5",paraId:2,tocIndex:0},{value:"loading delay",paraId:2,tocIndex:0},{value:"SWR(stale-while-revalidate)",paraId:2,tocIndex:0},{value:"\u7F13\u5B58",paraId:2,tocIndex:0},{value:"\u63A5\u4E0B\u6765\u8BA9\u6211\u4EEC\u5148\u4ECE\u4E24\u4E2A\u6700\u7B80\u5355\u7684\u4F8B\u5B50\u8BA4\u8BC6 ",paraId:3,tocIndex:0},{value:"useRequest",paraId:3,tocIndex:0},{value:"\u3002",paraId:3,tocIndex:0},{value:"useRequest",paraId:4,tocIndex:1},{value:" \u7684\u7B2C\u4E00\u4E2A\u53C2\u6570\u662F\u4E00\u4E2A\u5F02\u6B65\u51FD\u6570\uFF0C\u5728\u7EC4\u4EF6\u521D\u6B21\u52A0\u8F7D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u89E6\u53D1\u8BE5\u51FD\u6570\u6267\u884C\u3002\u540C\u65F6\u81EA\u52A8\u7BA1\u7406\u8BE5\u5F02\u6B65\u51FD\u6570\u7684 ",paraId:4,tocIndex:1},{value:"loading",paraId:4,tocIndex:1},{value:" , ",paraId:4,tocIndex:1},{value:"data",paraId:4,tocIndex:1},{value:" , ",paraId:4,tocIndex:1},{value:"error",paraId:4,tocIndex:1},{value:" \u7B49\u72B6\u6001\u3002",paraId:4,tocIndex:1},{value:`const { data, error, loading } = useRequest(getUsername); +`,paraId:26,tocIndex:13},{value:"\u53C2\u6570",paraId:27,tocIndex:14},{value:"\u8BF4\u660E",paraId:27,tocIndex:14},{value:"\u7C7B\u578B",paraId:27,tocIndex:14},{value:"data",paraId:27,tocIndex:14},{value:"service \u8FD4\u56DE\u7684\u6570\u636E",paraId:27,tocIndex:14},{value:"TData",paraId:27,tocIndex:14},{value:" | ",paraId:27,tocIndex:14},{value:"undefined",paraId:27,tocIndex:14},{value:"error",paraId:27,tocIndex:14},{value:"service \u629B\u51FA\u7684\u5F02\u5E38",paraId:27,tocIndex:14},{value:"Error",paraId:27,tocIndex:14},{value:" | ",paraId:27,tocIndex:14},{value:"undefined",paraId:27,tocIndex:14},{value:"loading",paraId:27,tocIndex:14},{value:"service \u662F\u5426\u6B63\u5728\u6267\u884C",paraId:27,tocIndex:14},{value:"boolean",paraId:27,tocIndex:14},{value:"params",paraId:27,tocIndex:14},{value:"\u5F53\u6B21\u6267\u884C\u7684 service \u7684\u53C2\u6570\u6570\u7EC4\u3002\u6BD4\u5982\u4F60\u89E6\u53D1\u4E86 ",paraId:27,tocIndex:14},{value:"run(1, 2, 3)",paraId:27,tocIndex:14},{value:"\uFF0C\u5219 params \u7B49\u4E8E ",paraId:27,tocIndex:14},{value:"[1, 2, 3]",paraId:27,tocIndex:14},{value:"TParams",paraId:27,tocIndex:14},{value:" | ",paraId:27,tocIndex:14},{value:"[]",paraId:27,tocIndex:14},{value:"run",paraId:27,tocIndex:14},{value:" \u624B\u52A8\u89E6\u53D1 service \u6267\u884C\uFF0C\u53C2\u6570\u4F1A\u4F20\u9012\u7ED9 service",paraId:28,tocIndex:14},{value:"\u5F02\u5E38\u81EA\u52A8\u5904\u7406\uFF0C\u901A\u8FC7 ",paraId:28,tocIndex:14},{value:"onError",paraId:28,tocIndex:14},{value:" \u53CD\u9988",paraId:28,tocIndex:14},{value:"(...params: TParams) => void",paraId:27,tocIndex:14},{value:"runAsync",paraId:27,tocIndex:14},{value:"\u4E0E ",paraId:27,tocIndex:14},{value:"run",paraId:27,tocIndex:14},{value:" \u7528\u6CD5\u4E00\u81F4\uFF0C\u4F46\u8FD4\u56DE\u7684\u662F Promise\uFF0C\u9700\u8981\u81EA\u884C\u5904\u7406\u5F02\u5E38\u3002",paraId:27,tocIndex:14},{value:"(...params: TParams) => Promise",paraId:27,tocIndex:14},{value:"refresh",paraId:27,tocIndex:14},{value:"\u4F7F\u7528\u4E0A\u4E00\u6B21\u7684 params\uFF0C\u91CD\u65B0\u8C03\u7528 ",paraId:27,tocIndex:14},{value:"run",paraId:27,tocIndex:14},{value:"() => void",paraId:27,tocIndex:14},{value:"refreshAsync",paraId:27,tocIndex:14},{value:"\u4F7F\u7528\u4E0A\u4E00\u6B21\u7684 params\uFF0C\u91CD\u65B0\u8C03\u7528 ",paraId:27,tocIndex:14},{value:"runAsync",paraId:27,tocIndex:14},{value:"() => Promise",paraId:27,tocIndex:14},{value:"mutate",paraId:27,tocIndex:14},{value:"\u76F4\u63A5\u4FEE\u6539 ",paraId:27,tocIndex:14},{value:"data",paraId:27,tocIndex:14},{value:"(data?: TData / ((oldData?: TData) => (TData / undefined))) => void",paraId:27,tocIndex:14},{value:"cancel",paraId:27,tocIndex:14},{value:"\u5FFD\u7565\u5F53\u524D Promise \u7684\u54CD\u5E94",paraId:27,tocIndex:14},{value:"() => void",paraId:27,tocIndex:14},{value:"\u53C2\u6570",paraId:29,tocIndex:15},{value:"\u8BF4\u660E",paraId:29,tocIndex:15},{value:"\u7C7B\u578B",paraId:29,tocIndex:15},{value:"\u9ED8\u8BA4\u503C",paraId:29,tocIndex:15},{value:"manual",paraId:29,tocIndex:15},{value:" \u9ED8\u8BA4 ",paraId:30,tocIndex:15},{value:"false",paraId:30,tocIndex:15},{value:"\u3002 \u5373\u5728\u521D\u59CB\u5316\u65F6\u81EA\u52A8\u6267\u884C service\u3002",paraId:30,tocIndex:15},{value:"\u5982\u679C\u8BBE\u7F6E\u4E3A ",paraId:30,tocIndex:15},{value:"true",paraId:30,tocIndex:15},{value:"\uFF0C\u5219\u9700\u8981\u624B\u52A8\u8C03\u7528 ",paraId:30,tocIndex:15},{value:"run",paraId:30,tocIndex:15},{value:" \u6216 ",paraId:30,tocIndex:15},{value:"runAsync",paraId:30,tocIndex:15},{value:" \u89E6\u53D1\u6267\u884C\u3002 ",paraId:30,tocIndex:15},{value:"boolean",paraId:29,tocIndex:15},{value:"false",paraId:29,tocIndex:15},{value:"defaultParams",paraId:29,tocIndex:15},{value:"\u9996\u6B21\u9ED8\u8BA4\u6267\u884C\u65F6\uFF0C\u4F20\u9012\u7ED9 service \u7684\u53C2\u6570",paraId:29,tocIndex:15},{value:"TParams",paraId:29,tocIndex:15},{value:"-",paraId:29,tocIndex:15},{value:"onBefore",paraId:29,tocIndex:15},{value:"service \u6267\u884C\u524D\u89E6\u53D1",paraId:29,tocIndex:15},{value:"(params: TParams) => void",paraId:29,tocIndex:15},{value:"-",paraId:29,tocIndex:15},{value:"onSuccess",paraId:29,tocIndex:15},{value:"service resolve \u65F6\u89E6\u53D1",paraId:29,tocIndex:15},{value:"(data: TData, params: TParams) => void",paraId:29,tocIndex:15},{value:"-",paraId:29,tocIndex:15},{value:"onError",paraId:29,tocIndex:15},{value:"service reject \u65F6\u89E6\u53D1",paraId:29,tocIndex:15},{value:"(e: Error, params: TParams) => void",paraId:29,tocIndex:15},{value:"-",paraId:29,tocIndex:15},{value:"onFinally",paraId:29,tocIndex:15},{value:"service \u6267\u884C\u5B8C\u6210\u65F6\u89E6\u53D1",paraId:29,tocIndex:15},{value:"(params: TParams, data?: TData, e?: Error) => void",paraId:29,tocIndex:15},{value:"-",paraId:29,tocIndex:15},{value:"\u4EE5\u4E0A\u662F useRequest \u6700\u57FA\u7840\u7684\u529F\u80FD",paraId:31,tocIndex:15}],rt={"packages-hooks-src-use-request-doc-index-demo-default":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,8316))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-index-demo-default",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(26056).Z},"etc-hooks":{type:"NPM",value:"0.4.2"},mockjs:{type:"NPM",value:"1.1.0"},react:{type:"NPM",value:"18.2.0"}}}},"packages-hooks-src-use-request-doc-index-demo-manual":{component:n.memo(n.lazy(function(){return Promise.all([e.e(801),e.e(433)]).then(e.bind(e,47005))})),asset:{type:"BLOCK",id:"packages-hooks-src-use-request-doc-index-demo-manual",refAtomIds:[],dependencies:{"index.tsx":{type:"FILE",value:e(66962).Z},react:{type:"NPM",value:"18.2.0"},antd:{type:"NPM",value:"5.9.3"},"etc-hooks":{type:"NPM",value:"0.4.2"}},title:"\u4FEE\u6539\u7528\u6237\u540D"}}},it={title:"\u5FEB\u901F\u4E0A\u624B",toc:"menu",filename:"packages/hooks/src/useRequest/doc/index/index.md",lastUpdated:169839795e4,nav:{path:"/hooks"},group:{path:"/use-request"},description:"useRequest \u662F\u4E00\u4E2A\u5F3A\u5927\u7684\u5F02\u6B65\u6570\u636E\u7BA1\u7406\u7684 Hooks\uFF0CReact \u9879\u76EE\u4E2D\u7684\u7F51\u7EDC\u8BF7\u6C42\u573A\u666F\u4F7F\u7528 useRequest \u5C31\u591F\u4E86\u3002"},bt=[{id:"\u5FEB\u901F\u4E0A\u624B",depth:1,title:"\u5FEB\u901F\u4E0A\u624B"},{id:"\u9ED8\u8BA4\u7528\u6CD5",depth:2,title:"\u9ED8\u8BA4\u7528\u6CD5"},{id:"\u624B\u52A8\u89E6\u53D1",depth:2,title:"\u624B\u52A8\u89E6\u53D1"},{id:"packages-hooks-src-use-request-doc-index-demo-manual",depth:3,title:"\u4FEE\u6539\u7528\u6237\u540D"}],Nt=[{value:"useRequest",paraId:0,tocIndex:0},{value:" \u662F\u4E00\u4E2A\u5F3A\u5927\u7684\u5F02\u6B65\u6570\u636E\u7BA1\u7406\u7684 Hooks\uFF0CReact \u9879\u76EE\u4E2D\u7684\u7F51\u7EDC\u8BF7\u6C42\u573A\u666F\u4F7F\u7528 ",paraId:0,tocIndex:0},{value:"useRequest",paraId:0,tocIndex:0},{value:" \u5C31\u591F\u4E86\u3002",paraId:0,tocIndex:0},{value:"useRequest",paraId:1,tocIndex:0},{value:" \u901A\u8FC7\u63D2\u4EF6\u5F0F\u7EC4\u7EC7\u4EE3\u7801\uFF0C\u6838\u5FC3\u4EE3\u7801\u6781\u5176\u7B80\u5355\uFF0C\u5E76\u4E14\u53EF\u4EE5\u5F88\u65B9\u4FBF\u7684\u6269\u5C55\u51FA\u66F4\u9AD8\u7EA7\u7684\u529F\u80FD\u3002\u76EE\u524D\u5DF2\u6709\u80FD\u529B\u5305\u62EC\uFF1A",paraId:1,tocIndex:0},{value:"\u81EA\u52A8\u8BF7\u6C42/\u624B\u52A8\u8BF7\u6C42",paraId:2,tocIndex:0},{value:"\u8F6E\u8BE2",paraId:2,tocIndex:0},{value:"\u9632\u6296",paraId:2,tocIndex:0},{value:"\u8282\u6D41",paraId:2,tocIndex:0},{value:"\u5C4F\u5E55\u805A\u7126\u91CD\u65B0\u8BF7\u6C42",paraId:2,tocIndex:0},{value:"\u9519\u8BEF\u91CD\u8BD5",paraId:2,tocIndex:0},{value:"loading delay",paraId:2,tocIndex:0},{value:"SWR(stale-while-revalidate)",paraId:2,tocIndex:0},{value:"\u7F13\u5B58",paraId:2,tocIndex:0},{value:"\u63A5\u4E0B\u6765\u8BA9\u6211\u4EEC\u5148\u4ECE\u4E24\u4E2A\u6700\u7B80\u5355\u7684\u4F8B\u5B50\u8BA4\u8BC6 ",paraId:3,tocIndex:0},{value:"useRequest",paraId:3,tocIndex:0},{value:"\u3002",paraId:3,tocIndex:0},{value:"useRequest",paraId:4,tocIndex:1},{value:" \u7684\u7B2C\u4E00\u4E2A\u53C2\u6570\u662F\u4E00\u4E2A\u5F02\u6B65\u51FD\u6570\uFF0C\u5728\u7EC4\u4EF6\u521D\u6B21\u52A0\u8F7D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u89E6\u53D1\u8BE5\u51FD\u6570\u6267\u884C\u3002\u540C\u65F6\u81EA\u52A8\u7BA1\u7406\u8BE5\u5F02\u6B65\u51FD\u6570\u7684 ",paraId:4,tocIndex:1},{value:"loading",paraId:4,tocIndex:1},{value:" , ",paraId:4,tocIndex:1},{value:"data",paraId:4,tocIndex:1},{value:" , ",paraId:4,tocIndex:1},{value:"error",paraId:4,tocIndex:1},{value:" \u7B49\u72B6\u6001\u3002",paraId:4,tocIndex:1},{value:`const { data, error, loading } = useRequest(getUsername); `,paraId:5,tocIndex:1},{value:"\u5982\u679C\u8BBE\u7F6E\u4E86 ",paraId:6,tocIndex:2},{value:"options.manual = true",paraId:6,tocIndex:2},{value:"\uFF0C\u5219 useRequest \u4E0D\u4F1A\u9ED8\u8BA4\u6267\u884C\uFF0C\u9700\u8981\u901A\u8FC7 ",paraId:6,tocIndex:2},{value:"run",paraId:6,tocIndex:2},{value:" \u6765\u89E6\u53D1\u6267\u884C\u3002",paraId:6,tocIndex:2},{value:`const { loading, run } = useRequest(changeUsername, { manual: true }); diff --git a/~demos/:id/index.html b/~demos/:id/index.html index 58ce810..9632f23 100644 --- a/~demos/:id/index.html +++ b/~demos/:id/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-boolean-demo-example/index.html b/~demos/packages-hooks-src-use-boolean-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-boolean-demo-example/index.html +++ b/~demos/packages-hooks-src-use-boolean-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html b/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html +++ b/~demos/packages-hooks-src-use-callback-ref-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-clipboard-demo-example/index.html b/~demos/packages-hooks-src-use-clipboard-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-clipboard-demo-example/index.html +++ b/~demos/packages-hooks-src-use-clipboard-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-counter-demo-example/index.html b/~demos/packages-hooks-src-use-counter-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-counter-demo-example/index.html +++ b/~demos/packages-hooks-src-use-counter-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-creation-index-demo-example/index.html b/~demos/packages-hooks-src-use-creation-index-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-creation-index-demo-example/index.html +++ b/~demos/packages-hooks-src-use-creation-index-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-debounce-demo-example/index.html b/~demos/packages-hooks-src-use-debounce-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-debounce-demo-example/index.html +++ b/~demos/packages-hooks-src-use-debounce-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html b/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html +++ b/~demos/packages-hooks-src-use-debounce-fn-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-latest-demo-example/index.html b/~demos/packages-hooks-src-use-latest-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-latest-demo-example/index.html +++ b/~demos/packages-hooks-src-use-latest-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html b/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html +++ b/~demos/packages-hooks-src-use-memoized-fn-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html b/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html +++ b/~demos/packages-hooks-src-use-memoized-fn-demo-example2/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-mount-demo-example/index.html b/~demos/packages-hooks-src-use-mount-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-mount-demo-example/index.html +++ b/~demos/packages-hooks-src-use-mount-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-os-demo-example/index.html b/~demos/packages-hooks-src-use-os-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-os-demo-example/index.html +++ b/~demos/packages-hooks-src-use-os-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-cancel/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-default/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-lifecycle/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-run/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-manual-runasync/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-mutate/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-params/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html b/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html +++ b/~demos/packages-hooks-src-use-request-doc-basic-demo-refresh/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html b/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html +++ b/~demos/packages-hooks-src-use-request-doc-index-demo-default/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html b/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html +++ b/~demos/packages-hooks-src-use-request-doc-index-demo-manual/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-set-demo-example/index.html b/~demos/packages-hooks-src-use-set-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-set-demo-example/index.html +++ b/~demos/packages-hooks-src-use-set-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-title-demo-example/index.html b/~demos/packages-hooks-src-use-title-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-title-demo-example/index.html +++ b/~demos/packages-hooks-src-use-title-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-toggle-demo-example/index.html b/~demos/packages-hooks-src-use-toggle-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-toggle-demo-example/index.html +++ b/~demos/packages-hooks-src-use-toggle-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-toggle-demo-example2/index.html b/~demos/packages-hooks-src-use-toggle-demo-example2/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-toggle-demo-example2/index.html +++ b/~demos/packages-hooks-src-use-toggle-demo-example2/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-unmount-demo-example/index.html b/~demos/packages-hooks-src-use-unmount-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-unmount-demo-example/index.html +++ b/~demos/packages-hooks-src-use-unmount-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html b/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html +++ b/~demos/packages-hooks-src-use-unmount-ref-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file diff --git a/~demos/packages-hooks-src-use-update-demo-example/index.html b/~demos/packages-hooks-src-use-update-demo-example/index.html index 58ce810..9632f23 100644 --- a/~demos/packages-hooks-src-use-update-demo-example/index.html +++ b/~demos/packages-hooks-src-use-update-demo-example/index.html @@ -7,6 +7,6 @@
- + \ No newline at end of file