Comparing version 0.13.7 to 0.13.8
var Subscribe = require('./Subscribe') | ||
var ListenerMixin = { | ||
componentDidMount: function () { | ||
componentWillMount: function () { | ||
Subscribe.create(this) | ||
@@ -6,0 +6,0 @@ }, |
@@ -5,6 +5,10 @@ var MIXIN_REGISTRY = '_alt store listener registry_' | ||
create: function (context) { | ||
context[MIXIN_REGISTRY] = [] | ||
context[MIXIN_REGISTRY] = context[MIXIN_REGISTRY] || [] | ||
}, | ||
add: function (context, store, fn) { | ||
if (!context[MIXIN_REGISTRY]) { | ||
Subscribe.create(context) | ||
} | ||
var handler = fn.bind(context) | ||
@@ -11,0 +15,0 @@ context[MIXIN_REGISTRY].push({ store: store, handler: handler }) |
{ | ||
"name": "alt", | ||
"version": "0.13.7", | ||
"version": "0.13.8", | ||
"description": "A flux implementation", | ||
@@ -5,0 +5,0 @@ "main": "dist/alt.js", |
@@ -900,3 +900,3 @@ import 'babel/external-helpers' | ||
// set it up | ||
ListenerMixin.componentDidMount() | ||
ListenerMixin.componentWillMount() | ||
@@ -903,0 +903,0 @@ ListenerMixin.listenTo(myStore, handler) |
98911
2048