Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
raamcosta authored May 5, 2024
1 parent fca08de commit df28d71
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# ⚠️ WARNING - `1.11.3-alpha` / `2.1.0-beta02` and above (Compose 1.7)

## **DO NOT depend on jetpack compose navigation directly**
Compose Destinations provides the correct version transitively.
So, if you have dependency on `androidx.navigation:navigation-compose`, please remove it! This has always been true, but more important now.

## **DO NOT call `NavController.navigate` function** anywhere
With the introduction of type safe APIs on the official library, our `NavController` extension functions that received `Direction` are now shadowed by new member functions on `NavController`.
This means that the official member function would be called instead of our extension functions, and so we removed those extension functions.
Instead, always make sure to use `DestinationsNavigator`. You can get one of such navigators by:

- If inside a specific screen:
- Simply receive a `DestinationsNavigator` instead of `NavController` in your annotated screens.
- If navigating on top level (such as around `DestinationsNavHost`, bottom nav bar, etc)
- `navController.rememberDestinationsNavigator()` if in a Composable
- `navController.toDestinationsNavigator()` if not in a Composable

Read more about it [here](https://github.com/raamcosta/compose-destinations/releases/tag/2.1.0-beta02).

#
[![Maven metadata URL](https://img.shields.io/maven-metadata/v?versionPrefix=1.10&color=blue&metadataUrl=https://s01.oss.sonatype.org/service/local/repo_groups/public/content/io/github/raamcosta/compose-destinations/core/maven-metadata.xml&style=for-the-badge)](https://maven-badges.herokuapp.com/maven-central/io.github.raamcosta.compose-destinations/core)
[![License Apache 2.0](https://img.shields.io/github/license/raamcosta/compose-destinations.svg?style=for-the-badge&color=orange)](https://opensource.org/licenses/Apache-2.0)
[![Android API](https://img.shields.io/badge/api-21%2B-brightgreen.svg?style=for-the-badge)](https://android-arsenal.com/api?level=21)
Expand Down

0 comments on commit df28d71

Please sign in to comment.