We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 846474f commit efb6291Copy full SHA for efb6291
docs/basic/getting-started/hooks.md
@@ -153,7 +153,7 @@ function Foo() {
153
useEffect(() => {
154
// Note that ref.current may be null. This is expected, because you may
155
// conditionally render the ref-ed element, or you may forgot to assign it
156
- if (divRef.current) throw Error("divRef is not assigned");
+ if (!divRef.current) throw Error("divRef is not assigned");
157
158
// Now divRef.current is sure to be HTMLDivElement
159
doSomethingWith(divRef.current);
0 commit comments