React Uncontrolled Elements With “useRef” Hooks

React Uncontrolled Element with “useRef” Hook

Mayank Gupta
TechnoFunnel

--

React Hooks, “useRef” Hooks, Working with useRef Hooks, React useRef Hook, what is useRef, How to use useRef
Working with “useRef”

TechnoFunnel provides another article that is focussed on working with Uncontrolled Elements in React using “useRef” Hooks. We will be working with the latest features of Hooks in order to work with the following functionality. Uncontrolled Elements are the elements whose values and properties are handled using DOM reference.

What is React Uncontrolled Elements ?

useRef” React Hook can be used to create Uncontrolled Elements. These elements can be accessed using the DOM Reference. While creating an Uncontrolled Element, we use the keyword “ref”, which points out to a reference object, storing the DOM reference of the elements rendered in the component. Users can then use this reference to make updates to the component.

Uncontrolled Elements do not notify the component about the change in Element Property or Values, due to which the render cycle is not triggered when a component is updated using “ref”. It's like a traditional…

--

--

Mayank Gupta
TechnoFunnel

9 Years of Experience with Front-end Technologies and MEAN Stack. Working on all Major UI Frameworks like React, Angular and Vue https://medium.com/technofunnel