When not to use refs
- Should not be used with functional components because they don’t have instances.
- Not to be used on things that can be done declaratively.
- When using a library or framework that provides its methods for managing such as Redux or MobX.
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