# Tiamat -- simple Compose Multiplatform navigation

DevFeed: [Tiamat -- simple Compose Multiplatform navigation](<https://devfeed.tech/articles/tiamat-simple-compose-multiplatform-navigation-26016.md>)

Original publisher: [Read original article](<https://medium.com/mobilepeople/tiamat-simple-compose-multiplatform-navigation-3956dc00a607?source=rss-e93d234beac6------2>)

Author: Yahor Urbanovich

Published: 2024-02-29T12:52:22Z

Content type: tutorial

Language: en

Sources: [Yahor Urbanovich](<https://devfeed.tech/sources/stories-by-yahor-urbanovich-on-medium.md>)

Topics: [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [jetpack-navigation](<https://devfeed.tech/topics/jetpack-navigation.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [app](<https://devfeed.tech/tags/app.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [controller](<https://devfeed.tech/tags/controller.md>), [critical](<https://devfeed.tech/tags/critical.md>), [data](<https://devfeed.tech/tags/data.md>), [data-types](<https://devfeed.tech/tags/data-types.md>), [deep](<https://devfeed.tech/tags/deep.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [demo](<https://devfeed.tech/tags/demo.md>), [developers](<https://devfeed.tech/tags/developers.md>), [examples](<https://devfeed.tech/tags/examples.md>), [experiments](<https://devfeed.tech/tags/experiments.md>), [features](<https://devfeed.tech/tags/features.md>), [first](<https://devfeed.tech/tags/first.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [simple](<https://devfeed.tech/tags/simple.md>)

## AI overview

Tiamat is presented as a Compose Multiplatform navigation library built around screen instances rather than string keys. Its examples show defining destinations with `navDestination`, creating a controller, and navigating with `navigate`, `replace`, or `back`; typed `navArgs` pass data to screens, while `back` can return a result. The article also demonstrates nested controllers, editable back stacks, and a library-provided `TiamatViewModel` with configuration-change state saving and `viewModelScope`. It positions Tiamat as a simpler fit for the authors' project than their earlier Google Navigation Compose wrapper, and says Voyager lacked lambda parameters while Decompose felt too complex for that project. A multiplatform demo is mentioned; advanced cases such as bottom-bar navigation and custom transitions are pointed to in the sample app rather than explained here.

## Source excerpt

generated by Bing image creatorTiamat - simple Compose Multiplatform navigationIntro Why do we need another navigation library? You can say: just choose one of the existing solutions. For our project initially, we have chosen the Google Navigation Compose library. It was quite simple for developers who still migrated their minds to the new "Compose world". For some time we made a wrapper around the navigation library, to simplify access to the Navigation controller from any Compose screen. LocalNavController returns the current controller in composition Despite various improvements in navigation, we had a lot of critical moments that did not satisfy us: Navigation using String key A difficult way to pass data between screens Navigation only over replace We have experimented with some other libraries: Voyager -- it doesn't update very often (recently got status 1.0), no possibility to pass lambda as a parameter (issue) Decompose -- a too complex framework for our project. By the way, I use it on personal projects and recommend to try 🌚 other solutions overengeenered (by our opinion) Our requirements To reach a goal, we first need to understand what we are striving for. Here is what we expect from the navigation library: Compose first support + Multiplatform Simple API: Screeen creation, back stack handle, add/replace methods Navigation using Screen instance without any String keys A simple way to save State of the screen Pass Any data types between screens (even lambdas) and deliver the result Without code generation Without tying to any architecture or existing frameworks Welcome Tiamat We were so impressed with our internal library that we decided to make it open-source for Compose community. After several months of experiments and polishing the code we fit all our requirements above. Let's deep dive into code examples. Also, we have created a demo multiplatform App to demonstrate all current features. Please checkout the repository 🌚iOS, Desktop, Android sampleHow t