---
title: "Discussion on \"The difference between  useState()  and useRef()\" | Hashnode"
description: "Discussion on \"The difference between  useState()  and useRef()\". React js is an open-source javascript library that was developed by Facebook. It specializes in building interactive user interfaces in lesser lines of code. One of the most important features of react js is a Component. The component is an independe..."
url: "https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca"
---

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

Discussion

# [The difference between useState() and useRef()](https://susaksham.hashnode.dev/the-difference-between-usestate-and-useref?utm_source=hashnode&utm_medium=feed)

React js is an open-source javascript library that was developed by Facebook. It specializes in building interactive user interfaces in lesser lines of code. One of the most important features of react js is a Component. The component is an independe...

Mar 16, 2023 · 9 min read · susaksham.hashnode.dev  
Read the article

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

## Written by

[Susaksham Jain](https://hashnode.com/@Susaksham)

@Susaksham · India

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

React developer | technical writer

## Responses 6

Markdown supported · ⌘↵ to post

[Mudit Mishra](https://hashnode.com/@muditwt)

[Mar 18, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/64152dc92c6019bfde89d5f4)

This'll be my go to guide to review useState and useRef anytime I'll get stuck.

Very well put together, thanks for sharing 👏🏼

[Susaksham Jain](https://hashnode.com/@Susaksham)

[Mar 19, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/64152dc92c6019bfde89d5f4#reply-6416ba7e4e399cd51f92ef41)

I am glad, you liked it 👌 Thanks for your feedback 💫

[Anand Baraik](https://hashnode.com/@anandbaraik)

[Mar 17, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/6413bed99d169baf8ff691f2)

It was a nice read. Nicely explained.

[Susaksham Jain](https://hashnode.com/@Susaksham)

[Mar 17, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/6413bed99d169baf8ff691f2#reply-6413d407a22636ad25b27720)

Thanks 🙌

[Geya Sahithi](https://hashnode.com/@GeyaSahithi)

[Mar 16, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/6413618d9d169baf8ff68a4b)

Brilliantly put to writing Susaksham! Keep writing. Will be waiting for more to come.

[Susaksham Jain](https://hashnode.com/@Susaksham)

[Mar 17, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/6413618d9d169baf8ff68a4b#reply-6413d3ef9d169baf8ff693fa)

Thanks, I would definitely write more✍️

[Param Pragyan Panigrahi](https://hashnode.com/@Parampragyan)

[Mar 16, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/64135e219d169baf8ff689dd)

Great Article..., down to every last bit.

[Susaksham Jain](https://hashnode.com/@Susaksham)

[Mar 16, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/64135e219d169baf8ff689dd#reply-641361eea22636ad25b26b10)

Thanks🙌

[Shreyansh Tripathy](https://hashnode.com/@shreyT19)

[Mar 16, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/64135d9ca22636ad25b26a98)

Thanks For Explaining in a sequential order. It's of great help

[Tanya vats](https://hashnode.com/@Tanyaa)

[Mar 16, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/64135be69d169baf8ff68998)

Well explained and structured Thanks for sharing

[Susaksham Jain](https://hashnode.com/@Susaksham)

[Mar 16, 2023](https://hashnode.com/posts/the-difference-between-usestate-and-useref/6413506a62cfd665a1ac3fca/comment/64135be69d169baf8ff68998#reply-641361769d169baf8ff68a40)

Thanks for your valuable feedback 🙌
