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

Introduce a name to remember Navigator #234

Merged

Conversation

andremion
Copy link
Contributor

@andremion andremion commented Jan 5, 2024

This allows us to have multiple instances of navigators whenever we need them.

For example, when using multiple NavHosts:

val mainNavigator = rememberNavigator(name = "main")
val homeNavigator = rememberNavigator(name = "home")

NavHost(
    navigator = mainNavigator,
    initialRoute = "home",
)
NavHost(
    navigator = homeNavigator,
    initialRoute = "dashboard",
)

Copy link
Owner

@Tlaster Tlaster left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM!

@Tlaster Tlaster merged commit c555d98 into Tlaster:master Jan 5, 2024
2 checks passed
@andremion andremion deleted the introduce_name_to_remember_navigators branch January 5, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants