Hot Flows vs. Cold Flows In Kotlin - When to Use What?

Поділитися
Вставка
  • Опубліковано 22 гру 2024

КОМЕНТАРІ •

  • @heshamabdo6024
    @heshamabdo6024 3 місяці тому +28

    This channel is number 1 of Android developers new features

    • @PhilippLackner
      @PhilippLackner  3 місяці тому +1

      @@heshamabdo6024 🙏❤️

    • @Alchemist10241
      @Alchemist10241 3 місяці тому +1

      That's because his teaching style is better. I usually don't skip back when I'm watching the videos of this channel but I have to do too many skip backs in almost all of the other channels.

  • @xacompany
    @xacompany 3 місяці тому +17

    Please keep this kind of fundamental videos always “Flow”

  • @fars7346
    @fars7346 3 місяці тому +14

    Dude seriously they just asked me about this, today regarding this hot flow and cold flow on my interview, 😂

    • @ano9161
      @ano9161 3 місяці тому +2

      Lucky if you even managed to secure an interview. Please share how you did it.

  • @harshtiwari5591
    @harshtiwari5591 3 місяці тому +2

    Hi Philipp,
    I just wanted to say that I absolutely love your teaching style and was really excited to purchase your course. However, as an Indian citizen, I find the price to be quite high due to the lack of regional pricing. I was wondering if it might be possible to adjust the pricing for students like me from other countries so that we can also benefit from your excellent content

  • @EnterQuiz
    @EnterQuiz 3 місяці тому +3

    I am big fan of you from India 😊😊😊

  • @tch.777
    @tch.777 3 місяці тому +1

    Amazing like always, ty!!🔥🙏

  • @MostafaMohamed-ie6tr
    @MostafaMohamed-ie6tr 2 місяці тому

    🎯 Key points for quick navigation:
    ❄️ Concepts of Cold and Hot Flows: The video explains the difference between cold and hot flows in Kotlin and when to use each.
    🔄 Cold Flow Basics: Cold flows do nothing until there is at least one collector, activating only when someone listens to them.
    🚀 Introducing Collectors: A flow collector actively subscribes to flow emissions, triggering the flow's execution.
    🔥 Hot Flows Explained: Hot flows emit values regardless of collectors, meaning they don't wait for active subscribers.
    📊 Shared Flow and State Flow: These are two types of hot flows where shared flows can lose emissions without a collector, while state flows keep the latest value.
    🔁 Converting Cold to Hot: Use functions like `shareIn` and `stateIn` to transform cold flows into hot flows for different use cases.
    🗺️ Practical Examples: Real-world examples illustrate when to use cold vs. hot flows based on the necessity of shared or unique emissions.
    📚 Upcoming Masterclass: Announcement of a detailed Kotlin coroutines and flows masterclass to provide structured learning for these complex topics.
    Made with HARPA AI

  • @Zimallearnings
    @Zimallearnings 3 місяці тому

    Sir please tell me how I can add pdf dependency in koala setup on android studio please tell me I am very worried about this

  • @Alchemist10241
    @Alchemist10241 3 місяці тому +1

    Thanks for clarifying these basic but extremely necessary material. I didn't know launchIn operator converts a cold flow to a hot flow. in my last project I have used launchIn a lot. now I have to change my entire code if necessary.

    • @PhilippLackner
      @PhilippLackner  3 місяці тому +2

      LaunchIn does not convert between cold and hot, it just launches the flow (like collect)

    • @Alchemist10241
      @Alchemist10241 3 місяці тому

      ​@@PhilippLackner thanks for correcting my misunderstanding again.

  • @hamaalahama4192
    @hamaalahama4192 3 місяці тому

    Dude seriously they just asked me about this, today regarding this hot flow and cold flow on my interview,

  • @Roninserotonin
    @Roninserotonin 3 місяці тому +2

    Any updates on releasing the Crypto app tutorial?

    • @PhilippLackner
      @PhilippLackner  3 місяці тому +3

      @@Roninserotonin probably towards end of September

    • @Roninserotonin
      @Roninserotonin 3 місяці тому

      @@PhilippLackner Awesome thank you ☺️

  • @manshalkhatri9289
    @manshalkhatri9289 3 місяці тому

    Well explained

  • @danyos7340
    @danyos7340 3 місяці тому

    Nice work!, What editor color scheme are you using?

  • @ahmadab9666
    @ahmadab9666 3 місяці тому +1

    can you make a video about Flutter (cross-platform) and native Android in terms of finding jobs and what you think in the future, what makes companies prefer Flutter these days, and what makes companies go with Flutter despite KMP becoming stable soon, find a job for native android become so hard, especially for android junior

    • @ChrisAthanas
      @ChrisAthanas 3 місяці тому +3

      Skip flutter. Google has recently laid of members of the Dart and Flutter teams, and has announced support for KMP as primary platform now.
      On my channel I show why KMP will be the dominant platform for mobile developers for the rest of the decade.
      tldr: Ignore flutter, learn kotlin and KMP

    • @ahmadab9666
      @ahmadab9666 3 місяці тому

      @@ChrisAthanas thx, i hope that but here in my country syria there are no companies work with native android, i have been studying native android for more then 2 years, i hope i could find job soon.

  • @mdalikazi
    @mdalikazi 3 місяці тому

    Nice video. Thank you.

  • @LightDante
    @LightDante 21 день тому

    Simple solution: When shared, use sharedFlow; In UI, use stateFlow

  • @NEMMOZ
    @NEMMOZ 3 місяці тому

    Good man

  • @ArthurKhazbs
    @ArthurKhazbs 3 місяці тому +1

    1. Pause the video
    2. Press 0 on the keyboard to rewind to start
    3. Enjoy the view

  • @ArthurKhazbs
    @ArthurKhazbs 3 місяці тому +1

    So the hot tap water is always running, but the cold tap has a valve and the water is only running when you open it…

  • @chrish7975
    @chrish7975 3 місяці тому +1

    How do you live with this much stuff in your brain??

  • @fitandenjoy
    @fitandenjoy 3 місяці тому

    Channel video and also jobs