Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed component attribute for HomeScreen #1795

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ import {NavigationContainer} from '@react-navigation/native';

export default function App() {
return (
<NavigationContainer>
{/* Rest of your app code */}
</NavigationContainer>
<NavigationContainer>{/* Rest of your app code */}</NavigationContainer>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is auto-formatted.

);
}
```
Expand All @@ -86,10 +84,10 @@ function MyStack() {
<Stack.Navigator>
<Stack.Screen
name="Home"
component={Home}
component={HomeScreen}
options={{title: 'Welcome'}}
/>
<Stack.Screen name="Profile" component={Profile} />
<Stack.Screen name="Profile" component={ProfileScreen} />
</Stack.Navigator>
</NavigationContainer>
);
Expand All @@ -111,6 +109,9 @@ function HomeScreen({navigation}) {
/>
);
}
function ProfileScreen() {
return <Text>This is Jane's profile</Text>;
}
```

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.
Expand Down