Commit 53e85054 authored by Alexander Kotov's avatar Alexander Kotov

restore game state after page reload

parent 0f1b7b5c
......@@ -4,7 +4,12 @@ import rootReducer from './reducers'
const store = createStore(
localStorage.state && JSON.parse(localStorage.state),
store.subscribe(() => {
localStorage.setItem('state', JSON.stringify(store.getState()))
export default store
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment