Thread
#compose
    Ian Warwick

    Ian Warwick

    2 years ago
    Some ramblings on LiveData usage, interested in feedback on how other folks are using LiveData so far with compose https://medium.com/@fluxtah/another-way-of-using-livedata-with-jetpack-compose-77a28c287af9?sk=69d5bf1973cffcb7d3665a33a405e99c
    Adam Powell

    Adam Powell

    2 years ago
    You could get rid of that recompose block by using
    var doError by mutableStateOf(true)
    The way you wanted to set up that DSL for observing is exactly why I like the idea of a suspending
    effect {}
    API like I mentioned in the other thread. It would let you write code like:
    effect {
      doOnStartThings()
      liveData.asFlow().collect {
        doOnResultThings(it)
      }
    }
    Ian Warwick

    Ian Warwick

    2 years ago
    nice @Adam Powell cheers will try that, I did think about using some state flag here but I guess it would always need to be reset back 🤔 though looking forward to what you guys come up with in regards to this
    Adam Powell

    Adam Powell

    2 years ago
    I'm spending a bunch of time thinking about the above and what it means for composability of time-driven factors. Data updates like this, animations, gestures over time, all of it can potentially speak the same language and get much easier to interleave and interact with
    Ian Warwick

    Ian Warwick

    2 years ago
    nice one! Totally looking forward to that! 🙂 specially coroutine integration.