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

Create sample integrating with compose-router. #1

Open
zach-klippenstein opened this issue Mar 23, 2020 · 4 comments
Open

Create sample integrating with compose-router. #1

zach-klippenstein opened this issue Mar 23, 2020 · 4 comments

Comments

@zach-klippenstein
Copy link
Collaborator

No description provided.

@noe
Copy link

noe commented Sep 22, 2020

In case someone arrives here looking for an example of the integration with compose-router, I got it working by:

  • Having compose-router working, doing as described in their readme.
  • Inside the Router, instantiate compose-backstack's Backstack Composable. To build Backstack pass the backStack.elements as argument to the constructor, where backStack is what you receive in the callback passed as children to the Router.
  • Inside the Backstack, have the when block with all the routes.

It looks like this:

    Router("blah", defaultRouting) { backStack ->
        Backstack(backStack.elements) { screen ->
            when (screen) {
                is ... -> ...

@zach-klippenstein
Copy link
Collaborator Author

Very cool! Would love to have a runnable sample that shows this off. Would you be interesting in posting a PR?

@noe
Copy link

noe commented Jan 17, 2021

What do you have in mind? An example app with a simple transition as example or something else?

@zach-klippenstein
Copy link
Collaborator Author

That would be great to start, yes. We can iterate and build more complex samples if they seem useful.

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

No branches or pull requests

2 participants