Skip to content

Commit 3c07958

Browse files
authored
Update typescript.md
Without <{}> TypeScript compiler shows this error: Generic type 'NavigationContainerRef' requires 1 type argument(s).ts(2314)
1 parent 11192c4 commit 3c07958

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

versioned_docs/version-5.x/typescript.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ import { NavigationContainerRef } from '@react-navigation/native';
252252

253253
// ...
254254

255-
const navigationRef = React.useRef<NavigationContainerRef>(null);
255+
const navigationRef = React.useRef<NavigationContainerRef<{}>>(null);
256256
```
257257

258258
Example when using `React.createRef`:

0 commit comments

Comments
 (0)