<commit_before>import { applyMiddleware, createStore, compose } from 'redux';
import thunk from 'redux-thunk';
import reducers from './reducers/index';

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; //eslint-disable-line
const middleware = applyMiddleware(thunk);

const initialState = () => {
  const persistedState = localStorage.getItem('reduxState');
  if (persistedState) {
    return JSON.parse(persistedState);
  }
  return {};
};

const store = createStore(reducers, initialState(), composeEnhancers(
    middleware,
));

store.subscribe(() => {
  const state = store.getState();
  const persistedState = {
    auth: state.auth,
    settings: state.settings,
    user: state.user,
  };
  localStorage.setItem('reduxState', JSON.stringify(persistedState));
});

export default store;<commit_msg>saving column to persistant state<commit_after>import { applyMiddleware, createStore, compose } from 'redux';
import thunk from 'redux-thunk';
import reducers from './reducers/index';

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; //eslint-disable-line
const middleware = applyMiddleware(thunk);

const initialState = () => {
  const persistedState = localStorage.getItem('reduxState');
  if (persistedState) {
    return JSON.parse(persistedState);
  }
  return {};
};

const store = createStore(reducers, initialState(), composeEnhancers(
    middleware,
));

store.subscribe(() => {
  const state = store.getState();
  const persistedState = {
    auth: state.auth,
    settings: state.settings,
    user: state.user,
    columns: state.columns,
  };
  localStorage.setItem('reduxState', JSON.stringify(persistedState));
});



export default store;
{'fraction_non_alphanumeric': 0.12819025522041763, 'fraction_numerical': 0.0, 'mean_word_length': 5.031468531468532, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '83983', 'n_tokens_mistral': 539, 'n_tokens_neox': 518, 'n_words': 115}