ursus
04/16/2026, 9:30 PMNav3 NavBackStack myself (i.e. not using the rememberNavBackStack -- without resorting to having keys be Parcelable ? (and keeping the @Serializable).
I'm poking inside the rememberNavBackStack but it uses some Saver , not sure how would I pass that into outState: Bundle that onSaveInstanceState provides?Ian Lake
04/17/2026, 3:35 AMNavBackStack uses.
In places like your activity, you can use the by saved which does all the work for you:
val backStack by saved { NavBackStack() }
You should probably stop overriding most methods in your activity at all, you don't really need to do that in 2026 anymore 🙂ursus
04/17/2026, 11:10 AMprivate val backStack by saved(serializer = NavBackStackSerializer(NavKeySerializer())) {
NavBackStack()
}
for completeness, otherwise runtime crash