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

Using method reference for better memorization. #739

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ fun KaigiApp(
drawerSheetContent = {
DrawerSheetContent(
selectedDrawerItem = kaigiAppScaffoldState.selectedDrawerItem,
onClickDrawerItem = { drawerItem ->
kaigiAppScaffoldState.navigate(drawerItem)
}
onClickDrawerItem = kaigiAppScaffoldState::navigate,
Copy link
Member

Choose a reason for hiding this comment

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

May I ask if we can fix the problem by adding Immutable to KaigiAppScaffoldState? 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Since KaigiAppScaffoldState as a DrawerState which is Stable, should we use Stable for the KaigiAppScaffoldState instead of Immutable?

Copy link
Member

Choose a reason for hiding this comment

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

I think so too!
But I think we should have both of codes, method reference and stable. So now, I merge this PR. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we should have both of codes, method reference and stable

@takahirom Agree. Thanks for merging. If you need any follow-up please assign me to a ticket.

)
}
) {
Expand Down