Skip to content

Commit 2bd8eda

Browse files
authored
Update refs-and-the-dom.md
1 parent 72fd7ff commit 2bd8eda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/docs/refs-and-the-dom.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Your first inclination may be to use refs to "make things happen" in your app. I
3333

3434
> Note
3535
>
36-
> 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.
36+
> 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.
3737
3838
### Creating Refs
3939

@@ -56,7 +56,7 @@ class MyComponent extends React.Component {
5656
When a ref is passed to an element in `render`, a reference to the node becomes accessible at the `current` attribute of the ref.
5757

5858
```javascript
59-
const node = this.myRef.current
59+
const node = this.myRef.current;
6060
```
6161

6262
The value of the ref differs depending on the type of the node:

0 commit comments

Comments
 (0)