Skip to content

Commit f7e0081

Browse files
committed
docs: update recap section in manipulating the dom with refs
Update a bullet point that was refrencing forwardRef as a means to passing ref to being able to pass ref like any other prop.
1 parent 6ae99dd commit f7e0081

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/learn/manipulating-the-dom-with-refs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ However, this doesn't mean that you can't do it at all. It requires caution. **Y
647647
- Refs are a generic concept, but most often you'll use them to hold DOM elements.
648648
- You instruct React to put a DOM node into `myRef.current` by passing `<div ref={myRef}>`.
649649
- Usually, you will use refs for non-destructive actions like focusing, scrolling, or measuring DOM elements.
650-
- A component doesn't expose its DOM nodes by default. You can opt into exposing a DOM node by using `forwardRef` and passing the second `ref` argument down to a specific node.
650+
- You can pass refs from parent component to child components just like any other prop.
651651
- Avoid changing DOM nodes managed by React.
652652
- If you do modify DOM nodes managed by React, modify parts that React has no reason to update.
653653

0 commit comments

Comments
 (0)