---
title: "Muhammad Ilham Robani (@hamko) | Hashnode"
description: "i am relatively new to coding, but i am surely progressing. Read the latest articles by Muhammad Ilham Robani on Hashnode."
url: "https://hashnode.com/@hamko"
---

@hamko

# Muhammad Ilham Robani

@hamko · Joined June 2022

i am relatively new to coding, but i am surely progressing

## Comments

[Hi Victoria, from what i see in your article about useState hook, you often use a function that returns updated state value rather than directly write the updated value as an argument. if that sounds confusing, let me direct it with an example: setMyArray(myArray=> (\[...myArray, 'c'\])) instead of just this: setMyArray(\[...myArray, 'c'\]) my question is, is that necessary to do so? i'm sorry if my question sounds stupid to you, but i am kind of new to programming. best regards, Ilham.](https://hashnode.com/posts/a-look-at-react-hooks-usestate/602a8b0f40efdc777c71c345/comment/62a60bb2165482d2b3eee7bf)

Comment · Article · Jun 12, 2022 · [A Look at React Hooks: useState](https://hashnode.com/posts/a-look-at-react-hooks-usestate/602a8b0f40efdc777c71c345)
