1.1.1 • Published 2 years ago

typescript-hooks-react v1.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

TypeScript Hooks React · PRs Welcome Up to Date

Typescript-hooks-react is a Typescript based library for Several Hooks.

  • Easy to Configure: React makes it painless to create interactive UIs. Hooks included are easy to use and configure.
  • Meets Many Usecases: Hooks included are well versed and suited to a large set of use cases.
  • Include Once and use Anywhere: These hooks can be use anywhere in your project and hence keeps the project simple.

Installation

npm i typescript-hooks-react --save

Documentation

:hammer_and_wrench: Under Construction. :face_in_clouds:

Examples

We have several examples. Here is the first one to get you started:

import { useKeyPress } from typescript-hooks-react
const shiftPressed = useKeyPress('Shift');

useEffect(() => {
    dispatch({ type: 'setShiftPressed', payload: shiftPressed });
  }, [shiftPressed]);

When Shift :keyboard:` is pressed. It dispatches a state change event and the change is updated across the application.

Contributing

Please follow strict Writing good typescript suggestions. For example.

Push the code and create a new PR.

Cheers :beers:

Good First Issues

Please Feel Free to report all the bugs :bugs: found whatsoever.

Thanks.

License

No License.