In this article, I’ll try to show you how to use the Navigation Component in a Modular Project.

The Navigation component is an Architecture Component and is part of Jetpack. It brings a lot to the table and hopefully, we’ll see this library grow and solve more of our problems with regards to navigation.

Why use the Navigation Component?

With the navigation component, you can see the user journey instantly through navigation graphs. Better than reading Intents and FragmentTransactions and looking at all possible destinations of that specific page

You can say goodbye to FragmentTransactions. Did you enjoy handling these? I didn’t. Now, the Navigation Component can handle this for you.

Correct Navigation between Up and Back navigation. No more worrying that the up button exits your app when coming from a deep link and speaking of deep links, they got that covered too.

Type-safety for arguments when using SafeArgs. No more need to have those safety checks and guards because it would enforce the types that you will define for navigation.

It also works with current Navigation UI Patterns like Bottom Navigation and Navigation Drawers with just a few configurations and it can handle transitions and animations between navigation.

Dynamic Feature ❌

Dynamic Feature Navigation is yet to be included in the library so if you’re using that, stick to your current navigation framework and be on the lookout for this feature.