react-navigation.github.io icon indicating copy to clipboard operation
react-navigation.github.io copied to clipboard

[Feature Request] Provide a Typescript snippet code in the examples

Open alamenai opened this issue 4 years ago • 1 comments

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>
  );
}

alamenai avatar May 27 '21 22:05 alamenai

What differences would a TS project have with that code snippet?

You can see this: https://reactnavigation.org/docs/typescript/

nandorojo avatar Aug 16 '21 18:08 nandorojo