Skip to content

Make Listener/Publisher methods classes #24

@devinivy

Description

@devinivy

Listener and Publisher methods cannot act as proper mixins, as they rely on certain contextual variables– for example, publishers have a this.emitter and listeners have this.subscriptions.

Suggestions are,

  1. To privatize contextual variables (see Use of 'subscriptions' variable refluxjs#442).
  2. Extend the publisher directly from the event-emitter class.
  3. To turn the mixin-style methods into constructors with prototypes.
  4. In turn allow createStore() and createAction() to be used as classes (i.e. new Reflux.Store(), new Reflux.Action()) (see Support ES6/TypeScript classes in Stores and Action types refluxjs#444).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions