Skip to content

Commit 15c689f

Browse files
committed
Updated the commands documentation
1 parent 9568590 commit 15c689f

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

docs/commands.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,25 @@ You should then import this screen into `App/Screens/index.ts` so it can be
167167
easily added to the router.
168168

169169
```js
170+
import { Box } from "@mobily/stacks";
170171
import React from "react";
171-
import { NavigationStackScreenComponent } from "react-navigation-stack";
172-
import Layout from "Remulus/App/Components/Layout";
173-
import Text from "Remulus/App/Components/Text";
172+
import { StackNavigationProp } from "@react-navigation/stack";
173+
import Text from "MyApp/App/Components/Text";
174174

175-
const Home: NavigationStackScreenComponent = ({ navigation }) => {
175+
type HomeScreenNavigationProp = StackNavigationProp<
176+
RootStackParamList,
177+
"Home"
178+
>;
179+
180+
type Props = {
181+
navigation: HomeScreenNavigationProp;
182+
};
183+
184+
function Home({ navigation }: Props) {
176185
return (
177-
<Layout.Center>
186+
<Box flex="fluid" alignX="center" alignY="center">
178187
<Text>Home</Text>
179-
</Layout.Center>
188+
</Box>
180189
);
181190
};
182191

0 commit comments

Comments
 (0)