Refs Current Properties
The current property value of refs depends on the ref target. Look at the table below, to understand the difference.
Target Type | current Property Value |
---|---|
HTML element | DOM element object |
Custom React component (class component) | React component instance |
ReactJS Refs
ReactJS Refs are used to access and modify the DOM elements in the React Application. It creates a reference to the elements and uses it to modify them.
Table of Content
- What are React refs ?
- Creating refs in React
- Accessing Refs in React
- When to use refs
- When not to use refs