Type-Safe Navigation with the OFFICIAL Compose Navigation Library

Поделиться
HTML-код
  • Опубликовано: 14 май 2024
  • In this video I'll show you the Type-Safe Navigation with the OFFICIAL Compose Navigation Library!
    💻 Let me be your mentor and become an industry-ready Android developer in 10 weeks:
    pl-coding.com/drop-table-ment...
    ⭐ Courses with real-life practices
    ⭐ Save countless hours of time
    ⭐ 100% money back guarantee for 30 days
    ⭐ Become a professional Android developer now:
    pl-coding.com/premium-courses...
    Get my FREE PDF about 20 things you should never do in Jetpack Compose:
    pl-coding.com/jetpack-compose...
    Regular programming advice on my Instagram page: / _philipplackner_
    Join my Discord server:
    / discord
    Get the source code for this video on GitHub:
    github.com/philipplackner/Typ...
  • НаукаНаука

Комментарии • 204

  • @sosaucemp3
    @sosaucemp3 Месяц назад +121

    7:17 He sounds so happy about it 😭

    • @WakeupDev.
      @WakeupDev. Месяц назад +10

      yea... I felt that in his voice 😄

    • @farfar5828
      @farfar5828 Месяц назад +6

      😂😂 I felt that too

    • @KevinMeneses
      @KevinMeneses Месяц назад

      X3

    • @BSS_00
      @BSS_00 Месяц назад +1

      its like every developer after a new good feature

    • @wame-bs7250
      @wame-bs7250 19 дней назад +1

      Cause this feature reduces hundreds of lines of boilerplate parsing arguments, ensuring they're not null, etc...

  • @Shengdanya
    @Shengdanya Месяц назад +60

    Yes. Yes. Yes. Omg. Tears of joy. Really needed a new way!!!!!

  • @ayitinya
    @ayitinya Месяц назад +16

    This is actually the best news in android i've heard in a really long while

  • @Jessewb786
    @Jessewb786 Месяц назад +1

    I was using Circuit and it's own navigation, so I've been making use of type-safe screens with painless parcelable arguments for quite a while.
    It's nice to now see this present in the official library.

  • @worthex_2
    @worthex_2 Месяц назад +1

    Omg this feels much more satisfying to do nagivation straight with classes now. Beautiful update.

  • @amit470
    @amit470 Месяц назад +3

    Such a relief, I need this to be in compose stable

  • @supadeurali9848
    @supadeurali9848 Месяц назад +2

    Wow wow wow.... tears in my eyes as well.
    So excited to try this.

  • @geanbrandao4987
    @geanbrandao4987 Месяц назад

    It's so easy now. Thank you for bringing this content to us! Keep up the great work, hugs from Brazil.

  • @annaberkovitch85
    @annaberkovitch85 Месяц назад +6

    Philipp, I've no words!!!! Thank you for brightening my day! But mostly thank you for the truly TREMENDOUS amount of work you're doing to bring all those updates to us in a manner that's both timely and incredibly clear. Just... Thank you!!!!

  • @MatthewSmith-mt3kz
    @MatthewSmith-mt3kz Месяц назад

    The demo is a pretty simplistic, but a good intro into the new Nav feature. In the real world you'd be getting the screen argument from savedstatehandle. Keep up the good work Phillipp, your videos have saved me hours. Thank you.

  • @vit4mint685
    @vit4mint685 Месяц назад +1

    Just wrapped up a project that used a lot of the old compose navigation. Looking forward to this

  • @JackCheungShingKit
    @JackCheungShingKit Месяц назад +3

    That JSON serialization is how I did before for passing argument.
    Though my approach on serialization & deserialization boilerplate can be ugly.
    Agree that it is a great improvement. I wish they made this available since the beginning.

  • @okeziokezino
    @okeziokezino Месяц назад

    Philip my guy, this is awesome... love all your work

  • @magedahmed5981
    @magedahmed5981 Месяц назад +8

    Finally .. a simple straight routing .. 😊

  • @nanonkay5669
    @nanonkay5669 10 дней назад +1

    2 reasons why I started and stopped Android dev within a year:
    1. Lack of a package manager that handles all package installations, they're dependencies and versions without having to manually do it every time and manually tweaking package and dependency versions
    2. Navigation between screens
    The second one seems to be solved. If the first one gets solved, I'd be back to Android dev in a heartbeat

  • @lindaporsius
    @lindaporsius Месяц назад +3

    Could you please make a video about Drawer/BottomNav using this lib? Especially how you would handle the selected-property of a nav-item (and the corresponding icons)

  • @raeesmohit01
    @raeesmohit01 Месяц назад

    It was really a big problem for beginners for me to change the screen and you made it easy now

  • @quangthaita6084
    @quangthaita6084 Месяц назад

    Thanks who created this, thanks Phillips ❤ That's what we're waiting for

  • @Mexicanerie
    @Mexicanerie Месяц назад

    Amazing ! I'm already making a PR on my projec with theses improvments 😁

  • @rishabhsaraswat1928
    @rishabhsaraswat1928 Месяц назад +13

    4:03 we can clearly see his happiness.

  • @coalacorey
    @coalacorey Месяц назад

    Finally! As soon as the stable release is out I will implement it.

  • @MrMacromicro
    @MrMacromicro Месяц назад

    Thanks philip ,you are really amazing.

  • @joatancarlos2704
    @joatancarlos2704 Месяц назад

    Thank you for bringing this content in a very didactic way

  • @ordnavile
    @ordnavile Месяц назад

    Very good, my project is in its final stages. I'm going to take advantage and refactor it to be cleaner. Thank you very much friend.

  • @levlevkin1325
    @levlevkin1325 Месяц назад

    Thanks Philipp! This is amazing!

  • @diabetesatuniversity
    @diabetesatuniversity Месяц назад

    Thanks this is helpful. Love your videos.

  • @moheltanani1036
    @moheltanani1036 16 дней назад

    If you were in tears, I'm crying right now hehe. Love it, thanks a lot!

  • @meidy3795
    @meidy3795 Месяц назад

    Good information Phillip ! Thos wpuld really helped my ptoject for compose multiplatform

  • @yahussainmazloom1
    @yahussainmazloom1 Месяц назад

    Finally some good updates, finally so much relief after this update

  • @TimKaragosian
    @TimKaragosian Месяц назад

    This looks similar, but even better than Decompose. As always, thanks for sharing these great videos and quality content!

  •  Месяц назад

    What an improvement!

  • @helmutbierbaumer2648
    @helmutbierbaumer2648 Месяц назад

    Highly appreciated 🥳

  • @arthurabreu1904
    @arthurabreu1904 Месяц назад

    Aaaaand thanks again for sharing man! 🎉🎉🎉

  • @AbuSaeeTech
    @AbuSaeeTech Месяц назад

    being as Android Native Developer appreciate 👍 you

  • @WakeupDev.
    @WakeupDev. Месяц назад

    Lucky me.. I just started doing compose and KMP, so I haven't suffered like you 😄 I see some cool changes

  • @MaisUmSomente
    @MaisUmSomente 22 дня назад

    Amazing, worth sharing

  • @wame-bs7250
    @wame-bs7250 Месяц назад +1

    Just use Reimagined Navigation that has a bunch of cool features such as type-safe navigaiton and Parcelable support out of the box. Also community have the Decompose as a multiplatform solution. Both of these libraries are completely driven by community so if you prefer only official libraries it's always OK

  • @alexmercerind
    @alexmercerind Месяц назад

    Finally we got it!!

  • @radheshyampatel5578
    @radheshyampatel5578 Месяц назад +3

    I am Big fan of yours video 🎉

  • @darknjko
    @darknjko Месяц назад

    Thanks again for that demo. Spot on, as always 👍
    Originaly, it seemed that the routing library was made to handle all routes as deeplinks. I wonder how deeplinks will work with that new approach? Should we write a deeplink handler that would reroute the user to the proper screen? 🤔

  • @rahathossainhimel7177
    @rahathossainhimel7177 Месяц назад

    Finally. Thank you Philipp

  • @DanielLuche
    @DanielLuche Месяц назад

    Nice. I'll be very usefull.
    Thanks to share bro

  • @vengateshm2122
    @vengateshm2122 Месяц назад +4

    There was a crash when we try to pass custom type like User(val id: Int, val name:String, val isPremium) in 2.8.0-alpha08 version which is fixed recently in version 2.8.0-beta01.

  • @tmjromao
    @tmjromao Месяц назад +1

    Thanks for the video. Is the bottom navigation also changing accordingly? What is needed to have screenB with bottom navigation graphs? Thanks.

  • @siftoshka
    @siftoshka Месяц назад +3

    What if I need this parameters on ViewModel?

  • @weaponx3373
    @weaponx3373 Месяц назад

    It is a really great news !!!

  • @9Blurke9
    @9Blurke9 Месяц назад +1

    Now we need another navigation video to compare all the options with pros and cons for each 😄

  • @ismailcreatvt
    @ismailcreatvt Месяц назад

    This is awesomeeeeee!!!

  • @mdisi5967
    @mdisi5967 Месяц назад

    Wow this is amazing 🎉

  • @arten8281
    @arten8281 25 дней назад

    OP gonna start using jet pack compose now

  • @yanneckreiss
    @yanneckreiss Месяц назад +1

    Haha I can relate to your joy about this update so much 😂Great video!

  • @MateuszKowol-nu8lr
    @MateuszKowol-nu8lr Месяц назад

    Still nice improvement however the main advantage of f.e. voyager is that you do not need to declare the navHost and its all routes. Voyager allows you to just jump from ScreenA to ScreenB without declaring it in your navHost. Google's navigation is still kinda similar to the fragment navgraph but without the childlish arrowing thing.

  • @douglascf2
    @douglascf2 Месяц назад +2

    Thanks for the video! So exciting! I have a question, does it automatically work with SavedStateHandle in a ViewModel?

    • @jeonie9682
      @jeonie9682 Месяц назад

      I did today and worked well. but you should use the method now like "SavedStateHandle.toRoute" not just "savedStateHandle" in a ViewModel.

  • @carlosalvarado5331
    @carlosalvarado5331 Месяц назад

    excellent just like SwiftUI!!

  • @LAOSmnagiva809
    @LAOSmnagiva809 Месяц назад

    Finally, FINALLY!

  • @solokiller5883
    @solokiller5883 Месяц назад

    Wow, this really is a lot easier than it used to be

  • @saidkamol3284
    @saidkamol3284 Месяц назад

    that's great, finally

  • @santyas
    @santyas Месяц назад

    Great Video!!! How do you retrieve args from the destination viewModel directly? If I use savedStateHandle inside viewModel still needs to safe the possible null argument using ?: or !!

  • @MO1NKHAN
    @MO1NKHAN Месяц назад

    OMG, I wish this could have come earlier. In my first app I have spent so much time and effort just to handle navigation without relying on 3rd party libraries.
    I have an e-commerce app running in production with lots of screens hanging on those route strings. It's time to refactor and remove all that boilerplate code.

  • @patsnow1066
    @patsnow1066 Месяц назад

    Need this in KMM!

  • @normno
    @normno Месяц назад +1

    Так забавно наблюдать, как мои любимые yoytebers выпускают обзоры на новые функции библиотек android и kmp примерно в одно и тоже время и у каждого свое красивое решение использования.

  • @Guilo583
    @Guilo583 Месяц назад

    thanks for video. Is this new lib support compose Multiplatform ?

  • @kuromujou1346
    @kuromujou1346 Месяц назад

    looking forward you make a video about this but with multiple nested graph. im newbie and im so confuse right now.

  • @filipmanevski9872
    @filipmanevski9872 Месяц назад

    Can you make a video on how to implement this way of navigation, using a navigation drawer for example or a bottom nav bar?

  • @simonsarhin2114
    @simonsarhin2114 Месяц назад

    I once said XML way of navigating was better than Compose. Now it's getting better. 😀

  • @osamamohsen3993
    @osamamohsen3993 Месяц назад

    I love you ♥️♥️♥️♥️♥️
    You are the best

  • @Pulkit__7
    @Pulkit__7 28 дней назад

    KotlinX Serialization brings back old memories from 2019

  • @pdjeowudjx
    @pdjeowudjx Месяц назад

    so great

  • @mark-147
    @mark-147 Месяц назад

    Any tips on naming? I already use FooScreen for the actual composable UI.

  • @manticomar1146
    @manticomar1146 Месяц назад +1

    The questino is in my view model how would I use savedStateHandle to extract the parameters?

  • @resitsahin7787
    @resitsahin7787 28 дней назад

    Hi Philip, can you make a video about drag and drop of lazy column, i have stuck there. It seems they have recently added this capability.

  • @amirhosseinghafoorian9985
    @amirhosseinghafoorian9985 Месяц назад

    Cool update 🤩 what I'm more curious about is that how does recommendations work ? is it an extension or a live template or smth ?

    • @PhilippLackner
      @PhilippLackner  Месяц назад

      Gemini AI suggestions in Android Studio Jellyfish

  • @aiyuayaan
    @aiyuayaan 28 дней назад

    Thanks @Philipp Lackner, one thing I have to mention is we can't send empty string as value, I am using 2.8.0-beta01.

    • @SunAndMoon-zc9vd
      @SunAndMoon-zc9vd 26 дней назад

      With "empty string" do you mean:
      1.a text with no characters; like ""
      2. or do you mean undefined
      3. or do you mean null

    • @aiyuayaan
      @aiyuayaan 25 дней назад

      @@SunAndMoon-zc9vd I mean "" this

  • @ivoheberle
    @ivoheberle Месяц назад

    Does this also work with the new kotlin multiplatform navigation or is it only an android feature?

  • @gloooooom6229
    @gloooooom6229 Месяц назад

    hi! how would i do it if i have 2 UI sets for 2 usertypes? i have a radiobutton on the signup to identify them. how can i navigate them to the right set of UIs i already have my bottomnav that has 5 screens

  • @emranulislam6469
    @emranulislam6469 Месяц назад

    Damn Thats so good

  • @sw_a_ppy
    @sw_a_ppy Месяц назад

    Pls make more on this

  • @MrMindfullness
    @MrMindfullness Месяц назад

    I have purchased Essentials course. Will this be incorporated in the course as well?

  • @ren7907
    @ren7907 22 дня назад

    isn't that cool? YES it is f cool! Thanks Philipp

  • @bitoons
    @bitoons Месяц назад

    So cool and so safe !! But now how i can use deeplink with this serialize data road ?

  • @safakcelik3173
    @safakcelik3173 Месяц назад

    Is this usable also for KMM?

  • @upbeatsarcastic8217
    @upbeatsarcastic8217 Месяц назад

    This is most exciting Compose feature to date imo. Having just finished a Compose app, navigation was the ugliest thing to deal with by a long way.

  • @EdwinRebolledo
    @EdwinRebolledo 6 дней назад

    We can use it in prod apps ? its on alpha or you recommend to use it from now on

  • @kurtispalu
    @kurtispalu 11 дней назад

    How do I reference the object into a navigation drawer argument? I keep getting crashes when I try to use a var to carry the object name into the navigation drawer item. Thanks

  • @MuhammedThansil-ms1ss
    @MuhammedThansil-ms1ss Месяц назад

    Can i use this in production app?

  • @Lucky_PhilB
    @Lucky_PhilB 28 дней назад

    Havent had the chance to play with this yet. How does it deal with deeplinks? And is this implemented for kmp compose?

  • @michakazmierczak4464
    @michakazmierczak4464 Месяц назад

    how to use this with multi module project with feature modules not depending on each other just like android recommends?

  • @Alchemist10241
    @Alchemist10241 Месяц назад

    with this approach how can we do a shared transition between screens?

  • @JeeteshSurana
    @JeeteshSurana Месяц назад

    is it also available for KMM?

  • @BugraKaraahmetoglu
    @BugraKaraahmetoglu Месяц назад +1

    Could you please explain how we can safely integrate vertex AI into the application with Google Cloud Console. I need this urgently.

  • @markanthonyponce9484
    @markanthonyponce9484 Месяц назад

    Clean

  • @user-nz3ve1jn1l
    @user-nz3ve1jn1l Месяц назад

    Can I use the library normally in kmm?
    Is it superior to voyager and decompose?

  • @csmuthukuda916
    @csmuthukuda916 Месяц назад

    Finally ❤️

  • @paulklein649
    @paulklein649 Месяц назад +4

    do somebody still wish to work for google and develop shitty frameworks and libs and maybe correct them 2 years later to be somewhat usable? I have the feeling that every dev-product google provides is garbage if jetbrains is not involved in the development

  • @dimitris1708
    @dimitris1708 Месяц назад

    FINALLYYYYYYYYYYYYY!!!

  • @zeroarst
    @zeroarst Месяц назад

    Is there a way to gradually migrate to this meanwhile still keep the current navigation in xml? Simple the current project has large codebase and too difficult to migrate it in one shot.

  • @sijanneupane
    @sijanneupane Месяц назад

    uffff, finally!!

  • @andrianbantero3462
    @andrianbantero3462 21 день назад

    how does this work on a nested navigation?

  • @deepaksingh-qd7xm
    @deepaksingh-qd7xm Месяц назад

    Now I will learn it I has paused my learning

  • @MrBzik1111
    @MrBzik1111 Месяц назад

    I wonder how other libraries (mentioned in the comments) can get use out of Parcelable. For KMP. I thought It was only android thing