What's Changed
- Add new inline rememberRouter variants by @xxfast in #101
- Add inline variant for rememberOnRoute by @xxfast in #104
Breaking Changes ⚠️
rememberRouter
with type parameter is now deprecated, and will be removed in the next release.
- val router: Router<Screen> = rememberRouter(type = Screen::class) { listOf(List) }
+ val router: Router<Screen> = rememberRouter { listOf(List) }
rememberOnRoute
with type parameter is now deprecated, and will be removed in the next release.
- val viewModel: ViewModel = rememberOnRoute(type = ViewModel::class) { ViewModel() }
+ val viewModel: ViewModel = rememberOnRoute { ViewModel() }
RouterContext
is now the receiver of therememberOnRoute
'sblock
- val viewModel: ViewModel = rememberOnRoute { context: RouterContext -> ViewModel(context) }
+ val viewModel: ViewModel = rememberOnRoute { ViewModel(this) }
Full Changelog: 0.8.0...0.9.0