Actions reused in parallel are failing the cycling check #82

Closed
spoike opened this Issue Sep 24, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@spoike
Member

spoike commented Sep 24, 2014

Listening to an action further down the data-flow chain, when it is already used will fail the cycle check.

Since actions are entry-points in the data-flow (except for the actions used as joins in Reflux.all), they really don't need to be checked in the cycle check.

Test case

    var action = Reflux.createAction();
    var store = Reflux.createStore({
        init: function() {
            this.listenTo(action, this.trigger);
        }
    });

    Console = function() {
        this.listenTo(store, this.output);
        this.listenTo(action, this.output); // CRASH!
    }
    Console.prototype.output = function() {
        console.log(arguments);
    };
    _.extend(Console.prototype, Reflux.ListenerMixin);

    var c = new Console();

    action("Hello");
    action2("World");

@spoike spoike added the bug label Sep 24, 2014

@spoike spoike added this to the 0.1.11 milestone Sep 24, 2014

@spoike spoike closed this in decb6c8 Sep 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment