No more String-based Routes! New Compose Navigation Release

Поділитися
Вставка
  • Опубліковано 8 тра 2024
  • 🏆 My Online Courses
    stevdza-san.com
    ☕ Let's get a coffee. You're paying! :)
    ko-fi.com/stevdza_san
    💻 Github
    github.com/stevdza-san
    📸 Instagram
    / stevdza_san

КОМЕНТАРІ • 42

  • @StevdzaSan
    @StevdzaSan  Місяць тому +21

    For a custom data type we should override one more function in the NavType to avoid that run-time exception: serializeAsValue() and just return Json.encodeToString(value) ✅

    • @galaxiegalaxie5003
      @galaxiegalaxie5003 Місяць тому

      Wow ita great to see such features. Anyways i wish they could make similar implementation like voyager in jepack naviagation which is so easy to do.🥰

    • @StevdzaSan
      @StevdzaSan  Місяць тому

      @galaxiegalaxie5003 Oh yeah Voyager has a really nice API indeed 😊

  • @skarloti
    @skarloti Місяць тому +3

    You always find amazingly good content. Thanks for the effort you put into teaching us something new. My day is perfect when it starts with your videos. Thank you.

  • @moaliyou
    @moaliyou Місяць тому +2

    I'll wait to see the stable one, this is really amazing

  • @raja_uma1r
    @raja_uma1r Місяць тому +2

    I always use a navigation viewModel to hold the data( also complex objects) and then read it from the destination screen.
    Use enum classes to define routes to overcome typing errors.
    This approach with compose navigation works well in every scenario.

    • @manofsteel6173
      @manofsteel6173 Місяць тому

      Bro I'm new to compose.can u provide any links to learn navigation

  • @heshamabdo6024
    @heshamabdo6024 Місяць тому

    your video is amazing. Thank you so much for sharing this new technology with us.

  • @user-gl8yw6yu2i
    @user-gl8yw6yu2i Місяць тому +3

    finally!!!! it was a giant pain in the ass for me! it's time for refactoring!!

  • @henrik908
    @henrik908 Місяць тому

    Thanks you for the video my friend.

  • @abdushakoor0099
    @abdushakoor0099 Місяць тому

    can't wait to test it out. it's been a long time especially because we already have type-safe in xml navigation

  • @codeforandroid
    @codeforandroid Місяць тому

    Nice update ✌

  • @Klusio19
    @Klusio19 Місяць тому +1

    Currently I'm taking Your course on Udemy ToDo App with Compose, and these string-based routes were strange to me. What a perfect time for this video to come out 😅

    • @StevdzaSan
      @StevdzaSan  Місяць тому +1

      I'll also update the course with this new approach, I'm waiting for a beta release just in case. :)

  • @jam-burger
    @jam-burger Місяць тому

    Can you make a video about explaining all the effects (like LaunchEffect and all)

  • @tusharsrivastava107
    @tusharsrivastava107 Місяць тому

    They are adding @Serializable and @Parcelable both to a class ? i was under impression parcelable can improve app performance over serilization.

  • @Yang-Youtube
    @Yang-Youtube Місяць тому

    The new safe args navigation doesn't seem to work with deeplink.😢

  • @Tbijo54
    @Tbijo54 Місяць тому

    Can we still get runtime args from SavedStateHandle in viewmodels?

  • @sebastianseno9285
    @sebastianseno9285 Місяць тому

    it's also work with Parcelize ?

  • @imammihir
    @imammihir Місяць тому

    Wow 🎉

  • @skarloti
    @skarloti Місяць тому

    1:38 Is it possible to replace its sealed class Screen with a sealed interface Screen?

    • @StevdzaSan
      @StevdzaSan  Місяць тому

      Haven't used sealed interface that much at all.

  • @abobus_f1
    @abobus_f1 Місяць тому

    Can you say what the better this navigation or voyager

    • @StevdzaSan
      @StevdzaSan  Місяць тому

      Ah, you're asking hard questions 😄

    • @abobus_f1
      @abobus_f1 Місяць тому

      @@StevdzaSan😄

  • @TomBerghuis
    @TomBerghuis Місяць тому

    Can you access the argument in the viewmodel?

    • @StevdzaSan
      @StevdzaSan  Місяць тому +1

      Yes, you can use SavedStateHandle and call the same toRoute() function within the ViewModel.

  • @vengateshm2122
    @vengateshm2122 Місяць тому

    I tried and faced the similar crash.

  • @ahmetfarukcuha7793
    @ahmetfarukcuha7793 Місяць тому

    eventually :)

  • @pyaesonehan19
    @pyaesonehan19 13 днів тому

  • @4ytonly
    @4ytonly Місяць тому +1

    I suggest you change the title of your video to include words navigation so its easier to find later!

  • @Nick-cx4rs
    @Nick-cx4rs Місяць тому +1

    Bro still basic ui components are (Experimental) and has bugs for 3 year still they dont care it ? And why they still making shitshow apis intead of fix experimentals and stable it. Imagine getting type safe arguments after 3 years.I really dont understand them

    • @StevdzaSan
      @StevdzaSan  Місяць тому

      Bugs are gonna be always present. I've never had any issue with their basic components. On what exactly are you referring to?

    • @Nick-cx4rs
      @Nick-cx4rs Місяць тому

      ​@@StevdzaSan e.g. disable swipe on bottomsheet. Put scrollable layout in it .bottomSheet closing on swipe. m3

  • @srkrishnan1989
    @srkrishnan1989 25 днів тому

    Try flutter and make difference video

  • @KingFuYouTube
    @KingFuYouTube Місяць тому

    first