Skip to content

Commit

Permalink
Update README.md and usage.md
Browse files Browse the repository at this point in the history
  • Loading branch information
serbelga committed Apr 7, 2024
1 parent 2dbf6f0 commit f771427
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,17 @@ the `safeNavRoute()` function if we are using annotation.
In the following code, we navigate to the `SettingsNavDestination`:

```kotlin
composable(navDestination = HomeNavDestination) {
HomeScreen(
navigateToSettings = {
navAction.navigate(
SettingsNavDestination.navRoute()
)
},
)
}
val navAction = rememberNavAction(navController)
NavHost(navController = navController, startNavDestination = HomeNavDestination) {
composable(navDestination = HomeNavDestination) {
HomeScreen(
navigateToSettings = {
navAction.navigate(
SettingsNavDestination.navRoute()
)
},
)
}
```

### Navigate with arguments
Expand Down
20 changes: 11 additions & 9 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,17 @@ the `safeNavRoute()` function if we are using annotation.
In the following code, we navigate to the `SettingsNavDestination`:

```kotlin
composable(navDestination = HomeNavDestination) {
HomeScreen(
navigateToSettings = {
navAction.navigate(
SettingsNavDestination.navRoute()
)
},
)
}
val navAction = rememberNavAction(navController)
NavHost(navController = navController, startNavDestination = HomeNavDestination) {
composable(navDestination = HomeNavDestination) {
HomeScreen(
navigateToSettings = {
navAction.navigate(
SettingsNavDestination.navRoute()
)
},
)
}
```

## Navigate with arguments
Expand Down

0 comments on commit f771427

Please sign in to comment.