---
title: "Discussion on \"ReactJS Input Elements: to useRef or to useState?\" | Hashnode"
description: "Discussion on \"ReactJS Input Elements: to useRef or to useState?\". What are controlled and uncontrolled form components? What are their use cases? How should you use the useRef or the useState React hooks?"
url: "https://hashnode.com/posts/reactjs-input-elements-to-useref-or-to-usestate/647cff5297d3deaca9d6f1ba"
---

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

Discussion

# [ReactJS Input Elements: to useRef or to useState?](https://maryetokwudo.hashnode.dev/reactjs-input-elements-to-useref-or-to-usestate?utm_source=hashnode&utm_medium=feed)

What are controlled and uncontrolled form components? What are their use cases? How should you use the useRef or the useState React hooks?

Jun 4, 2023 · 5 min read · maryetokwudo.hashnode.dev  
Updated Jun 25, 2023  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#reacthooks](https://hashnode.com/tag/reacthooks)
-   [#html5](https://hashnode.com/tag/html5)
-   [#forms](https://hashnode.com/tag/forms)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Mary Etokwudo](https://hashnode.com/@uniqcoda)

@uniqcoda · London, UK

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

I am a fullstack developer with experience in NodeJS, React, GraphQL and every other thing in-between including HTML and CSS 😀

Experienced engineer with a strong background in data science, machine learning and web development. My current expertise revolves around Generative AI and multi-modal AI (Language &amp; Vision). I am passionate about writing clean, maintainable, and scalable code that facilitates easy collaboration. I am also heavy on AI Research.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
