voyager
voyager copied to clipboard
TabNavigator is not recomposed
version (1.1.0-beta03) TabNavigator is not recomposed even if I set the key by a changable one from my side.
I changed the version to (1.1.0-alpha04) and its working as expected Please fix it on the newer version ASAP
@Composable
override fun Content() {
val appScreenModel = koinScreenModel<AppScreenModel>()
val languageIsoCode by appScreenModel.appLanguageIsoCode.collectAsState()
TabNavigator(HomeTab , key = languageIsoCode.toString()) {
Scaffold(
bottomBar = {
key(languageIsoCode.toString()){
val tabNavigator = LocalTabNavigator.current
val tabs = rememberTabsContainer()
BottomBar(tabs, tabNavigator)
}
},
content = { paddingValues ->
SystemAppearance(true , systemBarColor = 0xFFFFFFFF.hashCode())
Column(
modifier = Modifier
.fillMaxSize()
.background(Theme.color.background)
.padding(
bottom = paddingValues.calculateBottomPadding(),
start = paddingValues.calculateStartPadding(LayoutDirection.Ltr),
end = paddingValues.calculateEndPadding(LayoutDirection.Ltr),
)
) {
CurrentTab()
}
}
)
}
}`
I'm having the same issue. Was also mentioned on https://github.com/adrielcafe/voyager/issues/480