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.
About This Article
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.