react-smart-hooks
v1.3.4
Published
Simplify React app development with the versatile React Smart Hooks a powerful suite of optimized React hooks.
Downloads
5
Maintainers
Readme
react-smart-hooks
An advanced React component crafted for seamlessly rendering React Smart Hooks
onto the DOM, offering a sophisticated solution for optimized and efficient React applications.
Installation
npm
npm install react-smart-hooks
yarn
yarn add react-smart-hooks
pnpm
pnpm add react-smart-hooks
Usage
The react-smart-hooks
library provides a streamlined single-component export, simplifying the incorporation of advanced React hook functionalities into applications.
All code examples are presented using modern React Script modules and syntax. Furthermore, compatibility with React Js, as demonstrated by the usage of require(react-smart-hooks
), is conscientiously maintained.
React Smart Hooks Demo
How to Utilizing the React Smart Hooks Component
import React, { useEffect } from "react";
import { useWindowSize } from "react-smart-hooks";
const MyComponent = () => {
const windowSize = useWindowSize();
const { width, height } = windowSize;
useEffect(() => {
console.log(width, height);
}, [windowSize, width, height]);
return (
<>
{width}, {height}
</>
);
};
export default MyComponent;
Props
| Name | Type | Description | | ----------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | useWindowSize | Hooks | Get windows width and height size. | | useLocalStorage | Hooks | Easy to store your data in local using this hook. | | useOutsideClick | Hooks | Using outside click event. | | useDeviceDetection | Hooks | Device Detection for get which resolution on desplay. | | useAbsoluteURL | Hooks | This hooks use for dynamic pathprovide to images URL. | | useZIndexModal | Hooks | Hooks use for Bootstrap nested modal z-index. |