2.0.52 • Published 4 years ago
bjork_react-hookup v2.0.52
🍻React-hookup
A React Hooks utility library containing custom hooks/data structures
⚙Install
Use npm to install react-hookup.
> npm i bjork_react-hookup
🔥Usage
------------ // for example \\ ------------
import { useBoolean } from 'bjork_react-hookup'
const [ is, setIs, { toggle } ] = useBoolean(true)
------------ // or \\ ------------
import useBoolean from 'bjork_react-hookup/core/useBoolean'
const [ is, setIs, { toggle } ] = useBoolean(true)
🧰Hook Documentation
Name | Returns | Arguments |
---|---|---|
💡useActive | isActive, bind | |
📋useArray | array, setArray, methods | ( initial ) |
⏳useAsync | state, execute | ( asyncFunction, immediate ) |
🎭useBoolean | is, setIsByBoolean, methods | ( initial ) |
🏀useDebounce | state, setStateByDebounce | ( initial ) |
⌨useField | value, setValue, bind | ( initial ) |
🔦useFocus | isFocus, bind | |
👻useHover | isHover, bind | |
⌚useMemento | state, methods | ( options? ) |
📑useObject | object, setObject, methods | ( initial ) |
🖱useOnClickOutside | ( ref, func ) | |
🤏useScreenType | type | |
💾useStorage | item, setItem | ( type, key, initialValue ) |
🥁useThrottle | state, setStateByThrottle | ( initial ) |
🧭useWindowScroll | coordiantes, setCoordinatesAndScrollTo | |
↕useWindowSize | size |
👨💻Contribution
Pull requests are welcome. For any considerable changes, please open an issue first to discuss what you would like to change.
⚖Licence
2.0.3
4 years ago
2.0.5
4 years ago
2.0.51
4 years ago
2.0.52
4 years ago
2.0.2
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.7.6
4 years ago
1.7.5
4 years ago
1.7.1
4 years ago
1.7.0
4 years ago
1.6.5
4 years ago
1.6.1
4 years ago
1.6.0
4 years ago
1.5.5
4 years ago
1.5.1
4 years ago
1.5.0
4 years ago
1.4.0
4 years ago
1.4.11
4 years ago
1.4.13
4 years ago
1.4.12
4 years ago
1.3.9
4 years ago
1.3.8
4 years ago
1.2.0
4 years ago
1.1.0
4 years ago
1.3.7
4 years ago
1.3.6
4 years ago
1.3.5
4 years ago
1.3.0
4 years ago
1.0.0
4 years ago