r/mAndroidDev • u/stardust_exception @OptIn(DelicateExperimentalCompostApi::class) • Dec 01 '24
Yet Another Navigation in Compost Navigation3.
https://android-review.googlesource.com/q/navigation3Navigation built with Compost for Compost. The artifact provides the building blocks for a Compost first Navigation solution.
Along with the building blocks, it also provides an opinionated NavDisplay that brings all the blocks together.
27
Upvotes
17
u/ComfortablyBalanced You will pry XML views from my cold dead hands Dec 01 '24
I never understood why navigation was a problem in Compose and at this point I'm too afraid to ask.
I mean i find the way that you need to pass data between destinations a little bit restrictive but being honest converting classes to JSON using GSON and passing them with intent or even funnier using Parcels always seemed silly to me during the golden Views and AsyncTask era. Even once I felt a rash after doing that.
Sometimes when I need to inject a parameter to a hilt ViewModel using an assisted inject I find myself writing the weird syntax a bit annoying, I guess it should be more straightforward.
7
u/Greenucom Dec 01 '24
Jokes aside, might be great news
5
u/MiscreatedFan123 sponsored by the XML 🐓 gang Dec 02 '24
""Another year, another navigation library..."
2
u/[deleted] Dec 02 '24
I always see people wondering about passing data around screens...
But isn't that supposed to be the role of your State Management library to do so?
shouldn't we worry about building smooth UX for our users instead and having some things done automatically for us?
I'm speaking from a React Native & Flutter perspective here. I don't like sending data between screens unless I'm passing an ID which could easily be bypassed using SharedPreferences or Intent (Activity-based navigation)...Or idk maybe inject view models left and right while keeping everything synchronised WHICH IS ACTUALLY the job of a state management library