Skip to content

Commit

Permalink
Merge pull request #696 from reactjs/sync-3364c93f
Browse files Browse the repository at this point in the history
Sync with react.dev @ 3364c93
  • Loading branch information
jhonmike authored May 31, 2023
2 parents 331206a + 4e62b6b commit 4d7bc9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/content/learn/manipulating-the-dom-with-refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Then, use it to declare a ref inside your component:
const myRef = useRef(null);
```

Finally, pass it to the DOM node as the `ref` attribute:
Finally, pass your ref as the `ref` attribute to the JSX tag for which you want to get the DOM node:

```js
<div ref={myRef}>
Expand Down
2 changes: 1 addition & 1 deletion src/content/reference/react/useEffect.md
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ function ChatRoom({ roomId }) {
}
```
**To remove a dependency, you need to ["prove" to the linter *doesn't need* to be a dependency.](/learn/removing-effect-dependencies#removing-unnecessary-dependencies)** For example, you can move `serverUrl` out of your component to prove that it's not reactive and won't change on re-renders:
**To remove a dependency, you need to ["prove" to the linter that it *doesn't need* to be a dependency.](/learn/removing-effect-dependencies#removing-unnecessary-dependencies)** For example, you can move `serverUrl` out of your component to prove that it's not reactive and won't change on re-renders:
```js {1,8}
const serverUrl = 'https://localhost:1234'; // Not a reactive value anymore
Expand Down

0 comments on commit 4d7bc9d

Please sign in to comment.