Concept
Refs
Holding a value or DOM node across renders without causing a re-render.
Learn firstReact hooks
Refs
What should you learn before Refs?
- FunctionsReusable blocks of code; in JavaScript they are values that can be passed around and returned.
- PropsInputs passed from a parent component to a child.
- Variables and scopeWhere a variable can be read: global, function and block scope, and how let, const and var differ.
- ClosuresA function that keeps access to the variables of the scope it was created in, after that scope has finished.
- StateData that changes over time and makes the UI re-render, and where to keep it.
- React hooksFunctions such as useState and useEffect that add state and lifecycle to function components.
Practise Refs
- Intermediate React Interview Questions2 questions on Refs