Buckets:
| import{useRef as o,useState as f}from"react";import{useEvent as a}from'./use-event.js';function T(l,r,c){let[i,s]=f(c),e=l!==void 0,t=o(e),u=o(!1),d=o(!1);return e&&!t.current&&!u.current?(u.current=!0,t.current=e,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!e&&t.current&&!d.current&&(d.current=!0,t.current=e,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[e?l:i,a(n=>(e||s(n),r==null?void 0:r(n)))]}export{T as useControllable}; | |
Xet Storage Details
- Size:
- 693 Bytes
- Xet hash:
- d8e48364f4d4a7158e232d181891b1ccb0e7d1defb390e7258f78cdb9fad7d2b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.