react-navigation.github.io
react-navigation.github.io copied to clipboard
[Feature Request] Provide a Typescript snippet code in the examples
In this section you provide only the JS example, however, some developers tend to use Typescript with React-Native. I'd recommend an alternative TS snippet code.
The Javascript Example
import 'react-native-gesture-handler';
import * as React from 'react';
import { NavigationContainer } from '@react-navigation/native';
export default function App() {
return (
<NavigationContainer>{/* Rest of your app code */}</NavigationContainer>
);
}
What differences would a TS project have with that code snippet?
You can see this: https://reactnavigation.org/docs/typescript/