Compose Destinations

screenshot of Compose Destinations

Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate.

Overview:

The Compose Destinations library is a KSP (Kotlin Symbol Processing) library that simplifies navigation in Android apps using Jetpack Compose Navigation. It eliminates the need to write complex, non-type-safe, and boilerplate code and provides a simpler and safer way to handle navigation. The library offers features such as typesafe navigation arguments, easy setup of navigation graphs, navigation with results, integration with Accompanist Navigation-Material for bottom sheet screens, deep linking, Wear OS support, and more.

Features:

  • Typesafe navigation arguments: Allows for easy declaration and retrieval of navigation arguments, supporting Parcelable, Serializable, Enum, and classes annotated with kotlinx.serialization.Serializable.
  • Simple but configurable navigation graphs setup: Provides a straightforward way to set up navigation graphs for your app.
  • Navigating back with a result: Enables navigation back to a previous screen with a result in a simple and type-safe manner.
  • Getting navigation arguments from SavedStateHandle and NavBackStackEntry: Allows for retrieving navigation arguments in a type-safe way, especially useful in ViewModels.
  • Navigation animations: Offers support for navigation animations, including integration with Accompanist Navigation-Material for bottom sheet screens.
  • Easy deep linking to screens: Simplifies the process of implementing deep linking to specific screens in your app.
  • Wear OS support: Provides support for Wear OS devices starting from version 1.x.30.
  • Integration with Jetpack Compose Navigation: Offers all the features and functionalities of Official Jetpack Compose Navigation but in a simpler and safer way.

Summary:

The Compose Destinations library simplifies navigation in Android apps built with Jetpack Compose Navigation. It provides a more straightforward and safer way to handle navigation, eliminating the need for complex and boilerplate code. With features like typesafe navigation arguments, easy setup of navigation graphs, navigation with results, and deep linking, the library offers a comprehensive solution for navigating between screens in Compose-based apps. Additionally, it integrates seamlessly with Accompanist Navigation-Material for added functionalities and supports Wear OS devices. Overall, the Compose Destinations library enhances the navigation experience in Android apps using Jetpack Compose.