diff --git a/docs/basic/getting-started/hooks.md b/docs/basic/getting-started/hooks.md index 89ceaf18..3f48af5d 100644 --- a/docs/basic/getting-started/hooks.md +++ b/docs/basic/getting-started/hooks.md @@ -164,7 +164,7 @@ function Foo() { If you are sure that `divRef.current` will never be null, it is also possible to use the non-null assertion operator `!`: -``` +```tsx const divRef = useRef(null!); // Later... No need to check if it is null doSomethingWith(divRef.current);