File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -167,16 +167,25 @@ You should then import this screen into `App/Screens/index.ts` so it can be
167167easily added to the router.
168168
169169``` js
170+ import { Box } from " @mobily/stacks" ;
170171import 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
You can’t perform that action at this time.
0 commit comments