Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update typescript.md
Without <{}> TypeScript compiler shows this error:
Generic type 'NavigationContainerRef' requires 1 type argument(s).ts(2314)
  • Loading branch information
saeid-elio authored Sep 12, 2024
commit 3c079587e8dde847c0f7063e1377f00fb5cb3937
2 changes: 1 addition & 1 deletion versioned_docs/version-5.x/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ import { NavigationContainerRef } from '@react-navigation/native';

// ...

const navigationRef = React.useRef<NavigationContainerRef>(null);
const navigationRef = React.useRef<NavigationContainerRef<{}>>(null);
```

Example when using `React.createRef`:
Expand Down