1.3.4 • Published 3 months ago

react-smart-hooks v1.3.4

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

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

NameTypeDescription
useWindowSizeHooksGet windows width and height size.
useLocalStorageHooksEasy to store your data in local using this hook.
useOutsideClickHooksUsing outside click event.
useDeviceDetectionHooksDevice Detection for get which resolution on desplay.
useAbsoluteURLHooksThis hooks use for dynamic pathprovide to images URL.
useZIndexModalHooksHooks use for Bootstrap nested modal z-index.