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