Kotlin Context Receivers Made Easy!

Sdílet
Vložit
  • čas přidán 1. 07. 2024
  • 💻 Join my new Refactoring Legacy Code course now: bit.ly/47dzTLT
    📩 Sign up for my new newsletter here 👉 bit.ly/YCNewsletter102
    ✅ Join my Community on Discord:
    / discord
    In this video, we will see how and when to use the awesome feature of Kotlin Context Receivers.
    👨🏽🏭 Who I am:
    I'm Younes Charfaoui, a Software Engineer and an Android Developer. I make videos about Android development, Technology, and productivity for software engineers.
    😋 Be My Friend:
    💻 GitHub - github.com/Younes-Charfaoui/
    🐦 Twitter - / charfaouiyounes
    📑 Medium - / mxcsyounes
    📷 Instagram - / charfaoui.younes
    🌍 My website - www.charfaouiyounes.com

Komentáře • 4

  • @Alchemist10241
    @Alchemist10241 Před 2 měsíci

    This tip is very useful specially when you want to provide a context for your unit tests I think

  • @ChrisAthanas
    @ChrisAthanas Před 2 měsíci +2

    Using android Context and the Kotlin Context is far too confusing
    This video is a good topic but needs to be redone without using Android Context
    A custom class would be better and appropriate example

    • @CharfaouiYounes
      @CharfaouiYounes  Před 2 měsíci

      Thanks for your feedback Chris, Will work on another example!.

    • @Alchemist10241
      @Alchemist10241 Před 2 měsíci

      without context receivers creating general extension functions would be a nightmare, generics doesn't help either