UNPKG

use-st8

Version:

Single-function alternative for React.useState hook

3 lines (2 loc) 292 B
import{useState as t}from"react";function r(r){return function(){switch(arguments.length){case 0:return this[0];case 1:return void this[1](arguments[0]);default:throw new Error("Expected 0 or 1 arguments")}}.bind(t(r))}export default r;export{r as useSt8}; //# sourceMappingURL=index.mjs.map