From f7e008169eb358e8f4208c15b1de3cb0c2264355 Mon Sep 17 00:00:00 2001 From: Dipesh B C Date: Sun, 29 Dec 2024 16:18:33 -0500 Subject: [PATCH] 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. --- src/content/learn/manipulating-the-dom-with-refs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/learn/manipulating-the-dom-with-refs.md b/src/content/learn/manipulating-the-dom-with-refs.md index e366ea7cc04..604c6d77a68 100644 --- a/src/content/learn/manipulating-the-dom-with-refs.md +++ b/src/content/learn/manipulating-the-dom-with-refs.md @@ -647,7 +647,7 @@ However, this doesn't mean that you can't do it at all. It requires caution. **Y - Refs are a generic concept, but most often you'll use them to hold DOM elements. - You instruct React to put a DOM node into `myRef.current` by passing `
`. - Usually, you will use refs for non-destructive actions like focusing, scrolling, or measuring DOM elements. -- 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. +- You can pass refs from parent component to child components just like any other prop. - Avoid changing DOM nodes managed by React. - If you do modify DOM nodes managed by React, modify parts that React has no reason to update.