use-show-window-size
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

use-show-window-size

use-show-window-size shows window size during development.

Features

  • TypeScript support
  • SSR support

Installation

npm i --save use-show-window-size

Example

Example

Usage

Next.js

"use client";
import useShowWindowSize from "@/hooks/useShowWindowSize";
import { ReactNode } from "react";

export type LayoutProps = {
  children: ReactNode;
};

export default function Layout({ children }: LayoutProps): JSX.Element {
  useShowWindowSize({
    disable: process.env.NODE_ENV === "production",
  });

  return <>{children}</>;
}

Arguments

Argument Type Optional
disable Boolean
style Partial<CSSStyleDeclaration>

Return

void

Package Sidebar

Install

npm i use-show-window-size

Weekly Downloads

344

Version

0.0.1

License

MIT

Unpacked Size

7.6 kB

Total Files

7

Last publish

Collaborators

  • piro0919