goca
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Installation

npm i goca

funcion

useAxios

 const {data,error,loading} = useAxios({ method: 'get', url: '/endpoint', enabled: true })

you want controler where de you ejecute:

const {data,loading,error,fetcher} = useAxios({ method: 'get', url:'/endpoint', enabled: false })
 
 
 useEffect(()=>{
  fetcher({
     enabled: false,
     method: "get",
     url: "https://rickandmortyapi.com/api/character"
   })
 },[])

useInterval

useInterval(funcion,Time-delay)

useLocalstorage

// do you want save value set Item
 useLocalstorage(key,errorHandler,value to local storage)
 //do you want get item
 const [value, _]= useLocalstorage(key,errorHandler)
 //update value
 const [value, updateValue]= useLocalstorage(key,errorHandler)
 updateValue(value to local storage) //the same key

useDebounce

useDebounce(funcion,deley)

Readme

Keywords

Package Sidebar

Install

npm i goca

Weekly Downloads

1

Version

1.0.6

License

none

Unpacked Size

88.2 kB

Total Files

20

Last publish

Collaborators

  • gonzalomonteodorisio
  • carla.v.gonzalez
  • abaduna101