React useRef, forwardRef and Some Problems you May Run Into Working With Themby@serhiirubets
6,881 reads

React useRef, forwardRef and Some Problems you May Run Into Working With Them

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

In this article, I want to share with you about React `useRef` and `forwardRef` hooks. This article is not about what are react hooks, when they were created and why we should use them. If you are not familiar with react hooks or with react, you should read about react hooks and play with simple hooks such as `useState` and 'useEffect`. The purpose of useRef` is to keep variables between rerendering react components. But if you change your state, the component, which uses this state will rerender.

Company Mentioned

Mention Thumbnail
featured image - React useRef, forwardRef and Some Problems you May Run Into Working With Them
Serhii Rubets HackerNoon profile picture

@serhiirubets

Serhii Rubets


Receive Stories from @serhiirubets

react to story with heart
Serhii Rubets HackerNoon profile picture
by Serhii Rubets @serhiirubets.I'm a Fullstack JS engineer with 7 years of experience. Also, I'm a mentor, teacher, and author of front-end courses.
Read my stories

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa