From 2bd8eda1fce168cbca1f3873d7dc1b97c7dec473 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 30 Mar 2018 15:44:14 +0100 Subject: [PATCH] Update refs-and-the-dom.md --- content/docs/refs-and-the-dom.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/refs-and-the-dom.md b/content/docs/refs-and-the-dom.md index aa75d533..5a63d262 100644 --- a/content/docs/refs-and-the-dom.md +++ b/content/docs/refs-and-the-dom.md @@ -33,7 +33,7 @@ Your first inclination may be to use refs to "make things happen" in your app. I > Note > -> The examples below have been updated to use the React.createRef() API introduced in React 16.3. If you are using an earlier release of React, we recommend using [callback refs](#callback-refs) instead. +> The examples below have been updated to use the `React.createRef()` API introduced in React 16.3. If you are using an earlier release of React, we recommend using [callback refs](#callback-refs) instead. ### Creating Refs @@ -56,7 +56,7 @@ class MyComponent extends React.Component { When a ref is passed to an element in `render`, a reference to the node becomes accessible at the `current` attribute of the ref. ```javascript -const node = this.myRef.current +const node = this.myRef.current; ``` The value of the ref differs depending on the type of the node: