An advanced React component crafted for seamlessly rendering React Smart Hooks
onto the DOM, offering a sophisticated solution for optimized and efficient React applications.
npm
npm install react-smart-hooks
yarn
yarn add react-smart-hooks
pnpm
pnpm add react-smart-hooks
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.
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;
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. |