1.0.4 • Published 6 years ago
react-hooks-lab v1.0.4
react-hooks-lab
Repository for public react hooks
Hooks List
use-intersection-observer: Observes a DOM Elementuse-mouse-position: Mouse Position {x , y}use-on-hover: Detects hover events and accepts two callbacks for in & outuse-scroll-direction: Scroll direction top | up | downuse-scroll-progress: Scroll Progress 0-100use-scroll-to-top: Scrolls To Top fnuse-window-size: Window Size {innerHeight , innerWidth}
Install
npm install react-hooks-lab
yarn add react-hooks-labUsage
Sample Usage for one of the hooks
import React from "react";
import { useMousePosition } from "react-hooks-lab";
const Component = () => {
  const { x, y } = useMousePosition();
  return (
    <div>
      Mouse position x: {x}
      <br />
      Mouse position y: {y}
    </div>
  );
};For more information, please refer to Usage in our documentation.
Release
Steps:
git checkout master; git pull origin master- Document the changelog and bump the package.json version
 npm run buildnpm publish
By pushing master, Netlify will run npm run deploy and it will re-deply the docs here
Contributing
Please make sure to read the contributing guide before making a pull request.
Changelog
Detailed changes for each release are documented in the release notes.
What next
- Automate new hooks creation and publishing
 - Improve docs and examples
 - Typescript support
 - SSR Support
 - Conventional Commit Specifications
 
License
MIT © alemesa
This hook is created using create-react-hook.
