From 6627687b0bb794c910b2189345b3e948e9d263d9 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 3 Mar 2018 18:05:41 -0800 Subject: [PATCH] Describe what a ref is at the top of the doc --- content/docs/refs-and-the-dom.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/refs-and-the-dom.md b/content/docs/refs-and-the-dom.md index c23e24ba..3a7f133b 100644 --- a/content/docs/refs-and-the-dom.md +++ b/content/docs/refs-and-the-dom.md @@ -11,6 +11,8 @@ redirect_from: permalink: docs/refs-and-the-dom.html --- +Refs provide a way to access DOM nodes and React elements created by React by getting a _reference_ to the element in the render method. + In the typical React dataflow, [props](/docs/components-and-props.html) are the only way that parent components interact with their children. To modify a child, you re-render it with new props. However, there are a few cases where you need to imperatively modify a child outside of the typical dataflow. The child to be modified could be an instance of a React component, or it could be a DOM element. For both of these cases, React provides an escape hatch. ### When to Use Refs