Nested Navigation in Jetpack Compose

Jayant Kumar🇮🇳
3 min readApr 28, 2023
Photo by Mick Haupt on Unsplash

In this article we will learn about nested navigation in jetpack compose.

Before that make sure you read about this article on navigation in jetpack compose.

What is Nested Navigation and where to use it ? Let’s understand through a real world example.

Nested Navigation in Jetpack Compose allows you to organize and structure your app’s navigation hierarchy into smaller, more manageable sections.

It’s particularly useful for apps with complex navigation flows that require multiple levels of navigation.

Suppose we have four screen Splash , Login , Signup and Dashboard . If you think about the navigation graph for this , you will make like this

Splash — > Login → SignUp → Dashboard

That looks fine , there is no issue with that. But if you focus on the Login and Signup screen , we can make them nested navigation , because both are inter-relatable.

After applying nested graph on it , it looks like this …

Splash

Register

  • Login
  • Signup

Dashboard

--

--

Jayant Kumar🇮🇳

Hello , My name is Jayant, I am a tech youtuber and software Engineer from India 🇮🇳