1.0.0-rc.12 • Published 1 year ago
@q-dev/react-hooks v1.0.0-rc.12
Q React Hooks
A set of React hooks for Q Blockchain frontend projects.
Installation
To install the library, run the following command:
yarn add @q-dev/react-hooks
or
npm install @q-dev/react-hooks
Requirements
To install all dependencies, run the following command:
yarn add @q-dev/utils@^0.1.0 bignumber.js@^9.0.1 copy-to-clipboard@^3.3.1 framer-motion@^4.1.17
Usage
Importing
import { useInterval } from '@q-dev/react-hooks'
export default function App() {
const [count, setCount] = useState(0)
useInterval(() => {
setCount(count + 1)
}, 1000)
return <div>{count}</div>
}
Hooks
Hook | Description |
---|---|
useAnimateNumber | Animate number from one value to another. |
useChangesListener | Listen for changes in the value. |
useCopyToClipboard | Copy text to clipboard. |
useEventCallback | useCallback for events. |
useEventListener | Event listener handlers. |
useInfinityNumber | Infinity number animation. |
useInterval | Call a function at a specified interval. |
useLocalStorage | Manage local storage. |
useOnClickOutside | Handle click outside of the element. |
useOnScreen | Detect if the element is visible on the screen. |
useWindowSize | Get window size. |
Contribution
We welcome contributions to the library. If you would like to submit a pull request, please make sure to follow our code style.
Code of Conduct
This project and everyone participating in it is governed by the Q React Hooks Code of Conduct. By participating, you are expected to uphold this code.
Resources
License
1.0.0-rc.12
1 year ago
1.0.0-rc.11
1 year ago
1.0.0-rc.10
1 year ago
1.0.0-rc.9
1 year ago
1.0.0-rc.8
2 years ago
1.0.0-rc.7
2 years ago
1.0.0-rc.5
2 years ago
1.0.0-rc.6
2 years ago
1.0.0-rc.3
2 years ago
1.0.0-rc.4
2 years ago
1.0.0-rc.1
2 years ago
1.0.0-rc.2
2 years ago
1.0.0-rc.0
2 years ago
0.2.0
2 years ago
0.1.0
3 years ago