2.3.0 • Published 12 months ago

react-hook-collections v2.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

React Hooks Collection

A collection of useful custom React hooks.

Installation

To install React Hooks Collection, you can use NPM:

npm i react-hook-collections



Hooks
UseScrollPosition()
This hook tracks the current scroll position of the window and returns the value as a number.


Example usage:
import { UseScrollPosition } from 'react-hook-collections';

function MyComponent() {
  const scrollPosition = UseScrollPosition();
  console.log(scrollPosition); // Prints the scroll position on the console
  return (
    <div>My Component</div>
  );
}

GetAndDecode()
This hook help you to decode a jwt token from localStorage.

Example usage:
import {GetAndDecode} from 'react-hook-collections';

function MyComponent(){
  const decoded = GetAndDecode("tokenkey"); // pass the token key name
  console.log(decode); // prints the token decoded information
  return (
    <div>My Component</div>
  )
}

Git Repo : https://github.com/ABIJOSEPHGEORGE/react-hook-collections

License React Hooks Collection is licensed under the MIT License. See the LICENSE file for more information.

Contact Follow me on Instagram: @abin-joseph-george

Connect with me on LinkedIn: https://www.linkedin.com/in/abin-george/

Check out my GitHub: https://github.com/ABIJOSEPHGEORGE

Let me know if you need any further assistance!

2.3.0

12 months ago

2.2.0

12 months ago

2.1.0

12 months ago

2.0.0

12 months ago

1.18.0

12 months ago

1.17.0

1 year ago

1.16.0

1 year ago

1.15.0

1 year ago

1.14.0

1 year ago

1.13.0

1 year ago

1.12.0

1 year ago

1.11.0

1 year ago

1.10.0

1 year ago

1.9.0

1 year ago

1.8.0

1 year ago

1.6.0

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago