From 61a279ca151a7d45125efb95c9f36e0410aa9de4 Mon Sep 17 00:00:00 2001 From: tugbadogan Date: Sat, 28 Mar 2020 18:19:04 +0000 Subject: [PATCH] Fixed component attribute for HomeScreen Component attribute should be the same as function name, HomeScreen. I've also added ProfileScreen function to complete the example code. --- docs/navigation.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/navigation.md b/docs/navigation.md index 7ff4175a1cf..4494694331a 100644 --- a/docs/navigation.md +++ b/docs/navigation.md @@ -60,9 +60,7 @@ import {NavigationContainer} from '@react-navigation/native'; export default function App() { return ( - - {/* Rest of your app code */} - + {/* Rest of your app code */} ); } ``` @@ -86,10 +84,10 @@ function MyStack() { - + ); @@ -111,6 +109,9 @@ function HomeScreen({navigation}) { /> ); } +function ProfileScreen() { + return This is Jane's profile; +} ``` The views in the stack navigator use native components and the [`Animated`](animated.md) library to deliver 60fps animations that are run on the native thread. Plus, the animations and gestures can be customized.