---
title: "Discussion on \"Use Ref in React - the right way\" | Hashnode"
description: "Discussion on \"Use Ref in React - the right way\". Ref in React provides a way to access the DOM nodes created in the render method. It's used when you need direct access to a DOM node but how to use it?"
url: "https://hashnode.com/posts/ref-in-react/6593e1a25cc5cbd08ad6a2b6"
---

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

Discussion

# [Use Ref in React - the right way](https://10xdev.codeparrot.ai/ref-in-react?utm_source=hashnode&utm_medium=feed)

Ref in React provides a way to access the DOM nodes created in the render method. It's used when you need direct access to a DOM node but how to use it?

Jan 2, 2024 · 3 min read · 10xdev.codeparrot.ai  
Updated Jan 24, 2024  
Read the article

-   [#react](https://hashnode.com/tag/react)
-   [#ref](https://hashnode.com/tag/ref)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#dom](https://hashnode.com/tag/dom)

## Written by

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

@Royalj

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
