Skip to content
Open
Show file tree
Hide file tree
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
10 changes: 6 additions & 4 deletions docs/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Now you are ready to build and run your app on the device/simulator.

Now you can create an app with a home screen and a profile screen:

```tsx
```tsx title="App.tsx"
import {createStaticNavigation} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';

Expand Down Expand Up @@ -92,10 +92,10 @@ You can specify options such as the screen title for each screen in the `options

Inside each screen component, you can use the `useNavigation` hook to get the `navigation` object, which has various methods to link to other screens. For example, you can use `navigation.navigate` to go to the `Profile` screen:

```tsx
```tsx title="HomeScreen.tsx"
import {useNavigation} from '@react-navigation/native';

function HomeScreen() {
export default function HomeScreen() {
const navigation = useNavigation();

return (
Expand All @@ -107,8 +107,10 @@ function HomeScreen() {
/>
);
}
```

function ProfileScreen({route}) {
```tsx title="ProfileScreen.tsx"
export default function ProfileScreen({route}) {
return <Text>This is {route.params.name}'s profile</Text>;
}
```
Expand Down
10 changes: 6 additions & 4 deletions website/versioned_docs/version-0.80/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Now you are ready to build and run your app on the device/simulator.

Now you can create an app with a home screen and a profile screen:

```tsx
```tsx title="App.tsx"
import {createStaticNavigation} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';

Expand Down Expand Up @@ -92,10 +92,10 @@ You can specify options such as the screen title for each screen in the `options

Inside each screen component, you can use the `useNavigation` hook to get the `navigation` object, which has various methods to link to other screens. For example, you can use `navigation.navigate` to go to the `Profile` screen:

```tsx
```tsx title="HomeScreen.tsx"
import {useNavigation} from '@react-navigation/native';

function HomeScreen() {
export default function HomeScreen() {
const navigation = useNavigation();

return (
Expand All @@ -107,8 +107,10 @@ function HomeScreen() {
/>
);
}
```

function ProfileScreen({route}) {
```tsx title="ProfileScreen.tsx"
export default function ProfileScreen({route}) {
return <Text>This is {route.params.name}'s profile</Text>;
}
```
Expand Down
10 changes: 6 additions & 4 deletions website/versioned_docs/version-0.81/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Now you are ready to build and run your app on the device/simulator.

Now you can create an app with a home screen and a profile screen:

```tsx
```tsx title="App.tsx"
import {createStaticNavigation} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';

Expand Down Expand Up @@ -92,10 +92,10 @@ You can specify options such as the screen title for each screen in the `options

Inside each screen component, you can use the `useNavigation` hook to get the `navigation` object, which has various methods to link to other screens. For example, you can use `navigation.navigate` to go to the `Profile` screen:

```tsx
```tsx title="HomeScreen.tsx"
import {useNavigation} from '@react-navigation/native';

function HomeScreen() {
export default function HomeScreen() {
const navigation = useNavigation();

return (
Expand All @@ -107,8 +107,10 @@ function HomeScreen() {
/>
);
}
```

function ProfileScreen({route}) {
```tsx title="ProfileScreen.tsx"
export default function ProfileScreen({route}) {
return <Text>This is {route.params.name}'s profile</Text>;
}
```
Expand Down
10 changes: 6 additions & 4 deletions website/versioned_docs/version-0.82/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Now you are ready to build and run your app on the device/simulator.

Now you can create an app with a home screen and a profile screen:

```tsx
```tsx title="App.tsx"
import {createStaticNavigation} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';

Expand Down Expand Up @@ -92,10 +92,10 @@ You can specify options such as the screen title for each screen in the `options

Inside each screen component, you can use the `useNavigation` hook to get the `navigation` object, which has various methods to link to other screens. For example, you can use `navigation.navigate` to go to the `Profile` screen:

```tsx
```tsx title="HomeScreen.tsx"
import {useNavigation} from '@react-navigation/native';

function HomeScreen() {
export default function HomeScreen() {
const navigation = useNavigation();

return (
Expand All @@ -107,8 +107,10 @@ function HomeScreen() {
/>
);
}
```

function ProfileScreen({route}) {
```tsx title="ProfileScreen.tsx"
export default function ProfileScreen({route}) {
return <Text>This is {route.params.name}'s profile</Text>;
}
```
Expand Down
10 changes: 6 additions & 4 deletions website/versioned_docs/version-0.83/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Now you are ready to build and run your app on the device/simulator.

Now you can create an app with a home screen and a profile screen:

```tsx
```tsx title="App.tsx"
import {createStaticNavigation} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';

Expand Down Expand Up @@ -92,10 +92,10 @@ You can specify options such as the screen title for each screen in the `options

Inside each screen component, you can use the `useNavigation` hook to get the `navigation` object, which has various methods to link to other screens. For example, you can use `navigation.navigate` to go to the `Profile` screen:

```tsx
```tsx title="HomeScreen.tsx"
import {useNavigation} from '@react-navigation/native';

function HomeScreen() {
export default function HomeScreen() {
const navigation = useNavigation();

return (
Expand All @@ -107,8 +107,10 @@ function HomeScreen() {
/>
);
}
```

function ProfileScreen({route}) {
```tsx title="ProfileScreen.tsx"
export default function ProfileScreen({route}) {
return <Text>This is {route.params.name}'s profile</Text>;
}
```
Expand Down
10 changes: 6 additions & 4 deletions website/versioned_docs/version-0.84/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Now you are ready to build and run your app on the device/simulator.

Now you can create an app with a home screen and a profile screen:

```tsx
```tsx title="App.tsx"
import {createStaticNavigation} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';

Expand Down Expand Up @@ -92,10 +92,10 @@ You can specify options such as the screen title for each screen in the `options

Inside each screen component, you can use the `useNavigation` hook to get the `navigation` object, which has various methods to link to other screens. For example, you can use `navigation.navigate` to go to the `Profile` screen:

```tsx
```tsx title="HomeScreen.tsx"
import {useNavigation} from '@react-navigation/native';

function HomeScreen() {
export default function HomeScreen() {
const navigation = useNavigation();

return (
Expand All @@ -107,8 +107,10 @@ function HomeScreen() {
/>
);
}
```

function ProfileScreen({route}) {
```tsx title="ProfileScreen.tsx"
export default function ProfileScreen({route}) {
return <Text>This is {route.params.name}'s profile</Text>;
}
```
Expand Down
10 changes: 6 additions & 4 deletions website/versioned_docs/version-0.85/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Now you are ready to build and run your app on the device/simulator.

Now you can create an app with a home screen and a profile screen:

```tsx
```tsx title="App.tsx"
import {createStaticNavigation} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';

Expand Down Expand Up @@ -92,10 +92,10 @@ You can specify options such as the screen title for each screen in the `options

Inside each screen component, you can use the `useNavigation` hook to get the `navigation` object, which has various methods to link to other screens. For example, you can use `navigation.navigate` to go to the `Profile` screen:

```tsx
```tsx title="HomeScreen.tsx"
import {useNavigation} from '@react-navigation/native';

function HomeScreen() {
export default function HomeScreen() {
const navigation = useNavigation();

return (
Expand All @@ -107,8 +107,10 @@ function HomeScreen() {
/>
);
}
```

function ProfileScreen({route}) {
```tsx title="ProfileScreen.tsx"
export default function ProfileScreen({route}) {
return <Text>This is {route.params.name}'s profile</Text>;
}
```
Expand Down
10 changes: 6 additions & 4 deletions website/versioned_docs/version-0.86/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Now you are ready to build and run your app on the device/simulator.

Now you can create an app with a home screen and a profile screen:

```tsx
```tsx title="App.tsx"
import {createStaticNavigation} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';

Expand Down Expand Up @@ -92,10 +92,10 @@ You can specify options such as the screen title for each screen in the `options

Inside each screen component, you can use the `useNavigation` hook to get the `navigation` object, which has various methods to link to other screens. For example, you can use `navigation.navigate` to go to the `Profile` screen:

```tsx
```tsx title="HomeScreen.tsx"
import {useNavigation} from '@react-navigation/native';

function HomeScreen() {
export default function HomeScreen() {
const navigation = useNavigation();

return (
Expand All @@ -107,8 +107,10 @@ function HomeScreen() {
/>
);
}
```

function ProfileScreen({route}) {
```tsx title="ProfileScreen.tsx"
export default function ProfileScreen({route}) {
return <Text>This is {route.params.name}'s profile</Text>;
}
```
Expand Down