Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/malcodeman/malhooks

Collection of React Hooks.
https://github.com/malcodeman/malhooks

hooks react

Last synced: 21 days ago
JSON representation

Collection of React Hooks.

Awesome Lists containing this project

README

        

# [malhooks](http://malhooks.surge.sh)

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![npm](https://img.shields.io/npm/v/malhooks)](https://www.npmjs.com/package/malhooks)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/malcodeman/malhooks/blob/master/LICENSE)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)

Collection of [React Hooks](https://reactjs.org/docs/hooks-intro.html).

## Getting started

```
yarn add malhooks
```

## Hooks

- [`useFavicon`](./docs/useFavicon.md) — sets favicon of the page.
- [`useInterval`](./docs/useInterval.md) — declarative setInterval.
- [`useKeyPress`](./docs/useKeyPress.md) — tracks keys.
- [`useLocalStorage`](./docs/useLocalStorage.md) — manages a value in localStorage.
- [`useLockBodyScroll`](./docs/useLockBodyScroll.md) — locks scrolling of the body element.
- [`useOnClickOutside`](./docs/useOnClickOutside.md) — triggers callback when user clicks outside target area.
- [`usePreferredTheme`](./docs/usePreferredTheme.md) — returns preferred theme.
- [`usePrevious`](./docs/usePrevious.md) — returns the previous state or props.
- [`useTitle`](./docs/useTitle.md) — sets title of the page.

## License

[MIT](./LICENSE)