Bumble's Appyx vs Jetpack Compose Navigation
Original post Appyx vs Jetpack Compose Navigation
Article Summary
Andrey Kovalev from Bumble's engineering team challenges a fundamental assumption: what if Jetpack Compose Navigation's string-based routes and hardcoded BackStack are holding your Android app back?
Bumble released Appyx, an alternative navigation framework for Jetpack Compose that takes a radically different approach. Instead of string-based routes and a single navigation pattern, it offers type-safe navigation targets, testable business logic, and pluggable navigation models beyond the traditional back stack.
Key Takeaways
- Type-safe NavTarget classes replace error-prone string routes with compile-time validation
- Custom TransitionHandlers animate any Modifier property, not just predefined transitions
- NavModel abstraction enables ViewPager-like navigation and carousel modes beyond BackStack
- Navigation logic separates from UI layer, making it unit-testable
- Nodes are recomposition-safe for dependency injection without performance concerns
Appyx separates navigation from UI, provides compile-time safety, and enables custom navigation patterns that Jetpack Compose Navigation's BackStack-only approach cannot support.
Continue reading
What This Article Covers
Jetpack Compose Navigation's accompanist-navigation library only supports four animation types: enterTransition, exitTransition, popEnterTransition, and popExitTransition. This means developers can't animate custom properties like colour or rotation.
Appyx's TransitionHandler abstraction returns a Modifier that's applied to child Node composables. This lets you animate any property that Modifier supports, including colour and rotation, with just a single-line implementation in a separate class.
Developers can now animate properties beyond the four fixed transitions that Jetpack Compose Navigation offers. Complex animations like colour and rotation transitions are possible without needing workarounds.
This page summarizes “Appyx vs Jetpack Compose Navigation” by Bumble, published Aug 12, 2022. All credit for the original work goes to the authors.