Home / File/ use-lock-body.ts — ui Source File

use-lock-body.ts — ui Source File

Architecture documentation for use-lock-body.ts, a typescript file in the ui codebase. 1 imports, 0 dependents.

File typescript ComponentRegistry Styles 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  6ee33b99_b0ee_bc67_1958_6dc8a9a3d2cd["use-lock-body.ts"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  6ee33b99_b0ee_bc67_1958_6dc8a9a3d2cd --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  style 6ee33b99_b0ee_bc67_1958_6dc8a9a3d2cd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import * as React from "react"

// @see https://usehooks.com/useLockBodyScroll.
export function useLockBody() {
  React.useLayoutEffect((): (() => void) => {
    const originalStyle: string = window.getComputedStyle(
      document.body
    ).overflow
    document.body.style.overflow = "hidden"
    return () => (document.body.style.overflow = originalStyle)
  }, [])
}

Subdomains

Functions

Dependencies

  • react

Frequently Asked Questions

What does use-lock-body.ts do?
use-lock-body.ts is a source file in the ui codebase, written in typescript. It belongs to the ComponentRegistry domain, Styles subdomain.
What functions are defined in use-lock-body.ts?
use-lock-body.ts defines 1 function(s): useLockBody.
What does use-lock-body.ts depend on?
use-lock-body.ts imports 1 module(s): react.
Where is use-lock-body.ts in the architecture?
use-lock-body.ts is located at deprecated/www/hooks/use-lock-body.ts (domain: ComponentRegistry, subdomain: Styles, directory: deprecated/www/hooks).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free