---
title: "Discussion on \"UseRef Hooks\" | Hashnode"
description: "Discussion on \"UseRef Hooks\". import React, { useRef } from \"react\";\n\nconst CustomTextInput = () => {\n  const textInput = useRef();\n\n  focusTextInput = () => textInput.current.focus();\n\n  return (\n    <>\n      <input type=\"text\" ref={textInput} />\n      <button onClick={focusText..."
url: "https://hashnode.com/posts/useref-hooks/5f940d5b40346172a86c185e"
---

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

Discussion

# [UseRef Hooks](https://sannyblog.hashnode.dev/useref-hooks?utm_source=hashnode&utm_medium=feed)

import React, { useRef } from "react"; const CustomTextInput = () => { const textInput = useRef(); focusTextInput = () => textInput.current.focus(); return ( <> <input type="text" ref={textInput} /> <button onClick={focusText...

Oct 24, 2020 · 2 min read · sannyblog.hashnode.dev  
Read the article

## Written by

[Santhosh P](https://hashnode.com/@psanny11)

@psanny11

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

State&Behaviour Matters

## Responses

Comments are turned off for this post.
