From 8485eee7e592421eefb1596f469eafd43e9cb051 Mon Sep 17 00:00:00 2001 From: Josh Perez Date: Wed, 26 Aug 2015 17:15:52 -0700 Subject: [PATCH] Delete stores on hot reload --- src/alt/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/alt/index.js b/src/alt/index.js index 45104b92..5da27fe0 100644 --- a/src/alt/index.js +++ b/src/alt/index.js @@ -67,6 +67,9 @@ class Alt { ? store.createStoreFromClass(this, Store, key, ...args) : store.createStoreFromObject(this, Store, key) + /*istanbul ignore next*/ + if (module.hot) delete this.stores[key] + this.stores[key] = storeInstance StateFunctions.saveInitialSnapshot(this, key)