DroidKaigi / conference-app-2023

The Official Conference App for DroidKaigi 2023
Apache License 2.0
638 stars 207 forks source link

Update SnackbarHostState Initialization with remember Function #631

Closed takahirom closed 11 months ago

takahirom commented 11 months ago

Idea Description

Replace the current initialization of val snackbarHostState = SnackbarHostState() with val snackbarHostState = remember { SnackbarHostState() }. This change is aimed at following proper state management within the component.

val snackbarHostState = SnackbarHostState()

↓

val snackbarHostState = remember { SnackbarHostState() }

Reference images and links https://developer.android.com/reference/kotlin/androidx/compose/material3/SnackbarHostState#showSnackbar(androidx.compose.material3.SnackbarVisuals)

takarabe-hamuyatti commented 11 months ago

🙋

takahirom commented 11 months ago

Thanks Assigned 👍