From 2f7a7ec9071dfb3aef875d77019bbd530e343e5a Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 4 Jun 2022 13:23:31 +0300 Subject: [PATCH] docs: hooks: add syntax highlight --- docs/basic/getting-started/hooks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);