From a59db7d23b7451b5cc4d70b9ca84d30a31d558da Mon Sep 17 00:00:00 2001 From: cliffoo <41348973+cliffoo@users.noreply.github.com> Date: Thu, 23 Mar 2023 16:23:23 +0000 Subject: [PATCH] Update hooks.md --- README.md | 2 +- docs/basic/getting-started/hooks.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 462db4fc..0171486f 100644 --- a/README.md +++ b/README.md @@ -547,7 +547,7 @@ function Foo() { useEffect(() => { // Note that ref.current may be null. This is expected, because you may - // conditionally render the ref-ed element, or you may forgot to assign it + // conditionally render the ref-ed element, or you may forget to assign it if (!divRef.current) throw Error("divRef is not assigned"); // Now divRef.current is sure to be HTMLDivElement diff --git a/docs/basic/getting-started/hooks.md b/docs/basic/getting-started/hooks.md index f2091d11..19fb03f4 100644 --- a/docs/basic/getting-started/hooks.md +++ b/docs/basic/getting-started/hooks.md @@ -195,7 +195,7 @@ function Foo() { useEffect(() => { // Note that ref.current may be null. This is expected, because you may - // conditionally render the ref-ed element, or you may forgot to assign it + // conditionally render the ref-ed element, or you may forget to assign it if (!divRef.current) throw Error("divRef is not assigned"); // Now divRef.current is sure to be HTMLDivElement