1.0.0-rc.12 • Published 1 year ago

@q-dev/react-hooks v1.0.0-rc.12

Weekly downloads
-
License
LGPL-3.0
Repository
-
Last release
1 year ago

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

HookDescription
useAnimateNumberAnimate number from one value to another.
useChangesListenerListen for changes in the value.
useCopyToClipboardCopy text to clipboard.
useEventCallbackuseCallback for events.
useEventListenerEvent listener handlers.
useInfinityNumberInfinity number animation.
useIntervalCall a function at a specified interval.
useLocalStorageManage local storage.
useOnClickOutsideHandle click outside of the element.
useOnScreenDetect if the element is visible on the screen.
useWindowSizeGet 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

MIT

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