import { compose, createStore } from 'redux';
import middleware from './middleware';
import reducers from './reducers';

function configureStore() {
  return compose(middleware)(createStore)(reducers);
}

export var store = configureStore();

@@ -118,125 +118,398 @@
 ';%0A%0A
-function configureStore() %7B%0A  return compose(middleware)(createStore)(reducers);%0A%7D%0A%0Aexport var store = configureStore(
+// Poor man's hot reloader.%0A%0Avar lastState = JSON.parse(localStorage%5B%22farmbot%22%5D %7C%7C %22%7Bauth: %7B%7D%7D%22);%0A%0Aexport var store = compose(middleware)(createStore)(reducers, lastState);%0A%0Aif (lastState.auth.authenticated) %7B%0A  store.dispatch(%7B type: %22LOGIN_OK%22, payload: lastState.auth %7D);%0A%7D;%0A%0Afunction saveState()%7B%0A  localStorage%5B%22farmbot%22%5D = JSON.stringify(store.getState());%0A%7D%0A%0Astore.subscribe(saveState
 );%0A

Add improvised localstorage saving mechanism