From Voyager docs for the Bottom Tabs. ```override...
# compose
v
From Voyager docs for the Bottom Tabs.
Copy code
override val options: TabOptions
        @Composable
        get() {
            val title = stringResource(R.string.home_tab)
            val icon = rememberVectorPainter(Icons.Default.Home)

            return remember {
                TabOptions(
                    index = 0u,
                    title = title,
                    icon = icon
                )
            }
        }
I wonder what the possible reason to add wrap the TabOptions with the remember? Because it is simple data class. Optimisation step so we don't re-build it via just passing already remembered things? Which effectively blocks recomposition if title changes via locale change.
a
should be
remember(title, icon)
v
Why it should be remember?
a
Optimisation step so we don't re-build it via just passing already remembered things?
This. In any language (?) object creation is relatively more expensive than a lookup.