Skip to content

Commit c854da7

Browse files
authored
docs: hooks: add syntax highlight (#509)
1 parent 76fccdb commit c854da7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/basic/getting-started/hooks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function Foo() {
164164

165165
If you are sure that `divRef.current` will never be null, it is also possible to use the non-null assertion operator `!`:
166166

167-
```
167+
```tsx
168168
const divRef = useRef<HTMLDivElement>(null!);
169169
// Later... No need to check if it is null
170170
doSomethingWith(divRef.current);

0 commit comments

Comments
 (0)