Refs (1/4)
What are refs and why do we need them?
    • ref returns a reference to the element.
    • Refs provide a way to access DOM nodes or React elements created in the render method.
    • When we want a component to “remember” some information, but we don’t want that information to trigger new renders, we can use a ref.
    • In the typical React dataflow, props are the only way that parent components interact with their children. To modify a child, we re-render it with new props. However, there are a few cases where you need to imperatively modify a child outside of the typical data flow this can be done using refs.