Giter VIP home page Giter VIP logo

Comments (1)

pedroql avatar pedroql commented on May 27, 2024 2

Hi Jordan,

Thanks for raising this.

At first I thought this didn't happen because I have tested it in the sample app and also because I even wrote unit tests for this (I was wrong in the second part - maybe I write similar tests for the state but not effects).

The library works fine with regards to surviving a configuration change. In other words, if you start some long lasting operation while the phone is in portrait, then the user changes to landscape, and eventually the operation emits an effect, provided you handle configuration changes properly, you will get this effect. You can play with this in the sample app of this library.

But based on your description/by reading the article you linked, there is one case where this is problematic which is if the effect is emitted while there are no subscribers. It doesn't seem to work in this situation (the effect is dropped). I quickly changed the code to use a BroadcastChannel (the original way this was implemented in the library) and also a Channel as you described but the problem is still there.

I wrote a unit test that exhibits the problem. But it fails in all 3 modes I have tried. Sadly I don't have enough time to look at this (my priority is to move away from jcenter/bintray and manage my fulltime job).

If you are keen to help or just investigate, you can have a go at making this unit test pass: https://github.com/pedroql/mvflow/tree/fix_effects_dropped

Thanks

from mvflow.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.