Skip to content

azlibdar/react-customs

Repository files navigation

react-customs-banner

React Customs

A collection of essential React hooks built with JavaScript.

Compatible with React v18.0.0+


npm version license downloads


Installation

npm install react-customs

or

npm i react-customs

Hooks and Documentation

For documentation, please visit the GitBook URL


Hook Description Example
useCopyToClipboard Simplify copying text to the clipboard. Example
useCounter Manage a counter with step, min, and max values. Example
useDebounce Delay updates to a value. Example
useDefault Ensure a state always has a default value. Example
useDocumentTitle Dynamically update the title of a webpage. Example
useFavicon Easily update the favicon of your webpage. Example
useLockScroll Lock and unlock scrolling on the page. Example
useOnline Track the user's online/offline status. Example
usePrevious Track the previous and current state values. Example
useQueue Managing a queue data structure with a max size. Example
useStack Managing a stack data structure with a max size. Example
useTabAway Number of times a user navigates away from a tab. Example
useTheme Manage and toggle between light and dark themes. Example
useWindowSize Track the dimensions of the browser window. Example

Quick Example

import { useDocumentTitle } from "react-customs";

function App() {
  useDocumentTitle("Hello world!");

  return <h1>No so happy hacking!</h1>;
}

export default App;

Contributing

We welcome contributions! Please read our Contribution Guide before submitting any pull requests.


Contact

For any questions or feedback, please contact:

Email: [email protected]


Happy hacking!