// @flow
import type {Store, Dispatch, Action} from 'redux';

export const save = (store: Store) => (next: Dispatch) => (action: Action) => {
	setImmediate(() => {
		localStorage.setItem('store', JSON.stringify(store.getState()));
	});
	next(action);
};

// @flow
import type {Store, Dispatch, Action} from 'redux';

export const save = (store: Store) => (next: Dispatch) => (action: Action) => {
	if (action.id) {
		setImmediate(() => {
			localStorage.setItem('store', JSON.stringify(store.getState()));
		});
	}
	next(action);
};

Update store at Only import change
Update store at Only import change
