-
Notifications
You must be signed in to change notification settings - Fork 82
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
Clean up HomeScreen nav example #475
Conversation
We're working on a more fleshed out example of composite presenters, so cleaning this one up as it's sort of fallen out of date.
class HomeNavState { | ||
val navItems: ImmutableList<BottomNavItem> = | ||
persistentListOf(BottomNavItem.Adoptables, BottomNavItem.About) | ||
var index by mutableStateOf(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why we couldn't simplify this further and pass the screen down to the UI instead of using BottomNavItem
? Both Adoptables
and About
are 0 simple objects making this indirection feel like unnecessary boilerplate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the separation is bad in this case tbh, vs stuffing it into the home screen state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, fair enough 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better! One question that may lead to more cleanup
uhhh what happened to this test |
We're working on a more fleshed out example of composite presenters, so cleaning this one up as it's sort of fallen out of date.