---
title: "Discussion on \"useRef hook\" | Hashnode"
description: "Discussion on \"useRef hook\". In this article, we shall discuss what is the useRef hook. We will then understand the use cases of this hook with the help of examples. Then we will discuss when to use useRef. We shall also compare it with useState, another well-known hook. \n\nWhat ..."
url: "https://hashnode.com/posts/useref-hook/627acaae199297a9505d4dd4"
---

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

Discussion

# [useRef hook](https://muskaanshah.hashnode.dev/useref-hook?utm_source=hashnode&utm_medium=feed)

In this article, we shall discuss what is the useRef hook. We will then understand the use cases of this hook with the help of examples. Then we will discuss when to use useRef. We shall also compare it with useState, another well-known hook. What ...

May 10, 2022 · 5 min read · muskaanshah.hashnode.dev  
Read the article

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

## Written by

[Muskaan Shah](https://hashnode.com/@muskaanshah)

@muskaanshah

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

Learning full stack web development

## Responses 2

Markdown supported · ⌘↵ to post

[Tarandeep Singh](https://hashnode.com/@taran16)

[May 11, 2022](https://hashnode.com/posts/useref-hook/627acaae199297a9505d4dd4/comment/627bdb5f983a4ab69ce9da69)

Well written! Really liked the examples ✨

[Muskaan Shah](https://hashnode.com/@muskaanshah)

[May 11, 2022](https://hashnode.com/posts/useref-hook/627acaae199297a9505d4dd4/comment/627bdb5f983a4ab69ce9da69#reply-627c07a2e525f1b677137f33)

Thank you 💯

[Jaya Srikar](https://hashnode.com/@jayasrikark)

[May 10, 2022](https://hashnode.com/posts/useref-hook/627acaae199297a9505d4dd4/comment/627acd45f543e7a92b804254)

Easy to understand and very informative 👍

[Muskaan Shah](https://hashnode.com/@muskaanshah)

[May 11, 2022](https://hashnode.com/posts/useref-hook/627acaae199297a9505d4dd4/comment/627acd45f543e7a92b804254#reply-627c0740e525f1b677137f29)

Thank you!
