Manipulate DOM Elements in React with Refs

John Au-Yeung
DataSeries
Published in
4 min readMar 26, 2020

--

Photo by Heath Thistle on Unsplash

React is a library for creating front end views. It has a big ecosystem of libraries that work with it. Also, we can use it to enhance existing apps.

In this article, we’ll look at how to use refs to manipulate the DOM directly with React.

When to Use Refs

--

--