---
title: "Discussion on \"useDebounceCallback hook explained\" | Hashnode"
description: "Discussion on \"useDebounceCallback hook explained\". Timeouts, Closures, JavaScript and references."
url: "https://hashnode.com/posts/usedebouncecallback-hook-explained/678f5d610f7b4a800d01f1c7"
---

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

Discussion

# [useDebounceCallback hook explained](https://tigerabrodi.blog/usedebouncecallback-hook-explained?utm_source=hashnode&utm_medium=feed)

Timeouts, Closures, JavaScript and references.

Jan 21, 2025 · 4 min read · tigerabrodi.blog  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Tiger Abrodi](https://hashnode.com/@tigerabrodi)

@tigerabrodi · Germany

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

Obsessed with crafting software.

Just a guy who loves to write code and watch anime.

## Responses

Markdown supported · ⌘↵ to post

[rameztayem](https://hashnode.com/@rameztayem)

[Mar 4, 2025](https://hashnode.com/posts/usedebouncecallback-hook-explained/678f5d610f7b4a800d01f1c7/comment/67c7109a3dc4f8ca09ae4526)

let x = 1; const fn = () => console.log(x); // Captures x=1 x = 2; setTimeout(fn, 1000); // Will print 1, not 2

this will print 2 not 1 i have tried it any explaination why?
