---
title: "Martin Gainza Koulaksezian (@MartinGK) | Hashnode"
description: "Martin Gainza Koulaksezian (@MartinGK) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@MartinGK"
---

@MartinGK

# Martin Gainza Koulaksezian

@MartinGK · Joined May 2022

## Comments

[In both cases we use this two lines let currCount = countRef.current; setCounter(currCount => currCount + 1); why we use the same name for the function parameter inside the setCounter? setCounter(currCount => currCount + 1); I believed that adding an arrow function inside a setState will make the parameter the last value of the state thus unrelated with the countRef.current, and unrelated with the currCount, which is a local function variable.](https://hashnode.com/posts/how-to-use-javascript-scheduling-methods-with-react-hooks/5fa0ef8fad30887ef1e164de/comment/629282680989e6b52feb0125)

Comment · Article · May 28, 2022 · [How to use JavaScript scheduling methods with React hooks](https://hashnode.com/posts/how-to-use-javascript-scheduling-methods-with-react-hooks/5fa0ef8fad30887ef1e164de)
