From 1c703259485c0d5cf73ad85492e0da0ad172fade Mon Sep 17 00:00:00 2001 From: Brandon Tilley Date: Sun, 7 Dec 2014 16:04:38 -0800 Subject: [PATCH] Change StoreWatchMixin to watch in componentDidMount See #88 --- lib/store_watch_mixin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/store_watch_mixin.js b/lib/store_watch_mixin.js index c6456ab..48aeeaf 100644 --- a/lib/store_watch_mixin.js +++ b/lib/store_watch_mixin.js @@ -3,7 +3,7 @@ var _each = require("lodash-node/modern/collections/forEach"); var StoreWatchMixin = function() { var storeNames = Array.prototype.slice.call(arguments); return { - componentWillMount: function() { + componentDidMount: function() { var flux = this.props.flux || this.context.flux; _each(storeNames, function(store) { flux.store(store).on("change", this._setStateFromFlux);