---
title: "Comment by Peter Singh on \"useState() like a Pro ✨\" | Hashnode"
description: "nice article man, I am just learning react atm, and I kinda have a smaller more easier understanding to this. If you are familiar with &#39;getters&#39; and &#3"
url: "https://hashnode.com/posts/usestate-like-a-pro/601e598a072bc516ff6f4e9c/comment/601e95bf072bc516ff6f52c1"
---

[Discussion](https://hashnode.com/posts/usestate-like-a-pro/601e598a072bc516ff6f4e9c)

Comment [useState() like a Pro ✨](https://hashnode.com/posts/usestate-like-a-pro/601e598a072bc516ff6f4e9c)

[Peter Singh](https://hashnode.com/@aFuzzyBear)

[Feb 6, 2021](https://hashnode.com/posts/usestate-like-a-pro/601e598a072bc516ff6f4e9c/comment/601e95bf072bc516ff6f52c1)

nice article man, I am just learning react atm, and I kinda have a smaller more easier understanding to this. If you are familiar with 'getters' and 'setters' its pretty much that. just, the `useState(<value>)` is the function which we are passing in the values to. the first one being the state we wish to affect and the second being a setter method for that namespaced state so we can affect its value...`const [value,setValue] = setState(<default value>)` If I am wrong please let me know. Nothing worse that thinking something to be right when it was wrong in the first place.

[Shubham Sananse](https://hashnode.com/@shubham-sns)

[Feb 7, 2021](https://hashnode.com/posts/usestate-like-a-pro/601e598a072bc516ff6f4e9c/comment/601e95bf072bc516ff6f52c1#reply-601f997c0da0382a2d49ce2b)

nicely put , getters and setters concept will easily connect some missing dots for someone who's starting. Thanks for sharing your thoughts.

[Peter Singh](https://hashnode.com/@aFuzzyBear)

[Feb 7, 2021](https://hashnode.com/posts/usestate-like-a-pro/601e598a072bc516ff6f4e9c/comment/601e95bf072bc516ff6f52c1#reply-601febf50da0382a2d49d564)

Thanks man, take care[Shubham Sananse](https://hashnode.com/@shubham-sns)
