---
title: "Discussion on \"Custom Hook to get the window's width and height in React dynamically.\" | Hashnode"
description: "Discussion on \"Custom Hook to get the window's width and height in React dynamically.\". Hey Everyone!, Today we are going to discuss how to get a window's width and height with a custom hook. This coding exercise was asked of me in one of my interviews. The interviewer asked me, Payal, create one custom hook (for reusing the code) to ge..."
url: "https://hashnode.com/posts/custom-hook-to-get-the-windows-width-and-height-in-react-dynamically/648eb53af06fe4c61dc31dc3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Custom Hook to get the window's width and height in React dynamically.](https://payalsasmal.hashnode.dev/custom-hook-to-get-the-windows-width-and-height-in-react-dynamically?utm_source=hashnode&utm_medium=feed)

Hey Everyone!, Today we are going to discuss how to get a window's width and height with a custom hook. This coding exercise was asked of me in one of my interviews. The interviewer asked me, Payal, create one custom hook (for reusing the code) to ge...

Jun 18, 2023 · 4 min read · payalsasmal.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#reacthooks](https://hashnode.com/tag/reacthooks)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#ui](https://hashnode.com/tag/ui)

## Written by

[Payal Sasmal](https://hashnode.com/@payalsasmal)

@payalsasmal · India

  
[View profile](https://hashnode.com/@payalsasmal)

I am a Software developer | Web Developer | a technical blogger | write about code

I am a software engineer, Love to write technical blogs. explore new technologies and try to implement with the same.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
