Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions reused in parallel are failing the cycling check #82

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

Actions reused in parallel are failing the cycling check #82

spoike opened this issue Sep 24, 2014 · 0 comments
Labels
Milestone

Comments

@spoike
Copy link
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 as completed in decb6c8 Sep 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant