react-hooks/README.md

1.1 KiB

react-hooks

Introduction

react-hooks is an npm package that brings together multiple react hooks useful both in the development of the ecosystem in my home lab and for the general public.

Package installation

// with npm
npm i --save @flare/react-hooks --registry https://lab.code-rove.com/public-node-registry

// with yarn
yarn add @flare/react-hooks --registry https://lab.code-rove.com/public-node-registry

How to use the package

import { useWindowSize, useLink, useTitle } from "@flare/react-hooks";

Unit testing

Unit testing is done using Jest. This is an awesome testing framework created by Facebook.
The files containing tests are identified by the extension *.test.ts.
All tests in the package can be executed by running: npm test.

Changelog

1.0.0 - This version includes the initial version of react-hooks package.
1.0.1 - Small changes related to appearance (domain and readme updates).
1.1.0 - The project was migrated to TypeScript, and unit testing using Jest was added to it.
1.1.1 - Include the src directory in the npm package.