Skip to content

Commit

Permalink
improvement(store): use "createStore" from dynoStore
Browse files Browse the repository at this point in the history
dynoStore handles Redux's createStore under the hood

BREAKING CHANGE: store now uses dynoStore's

improves #43
  • Loading branch information
aneurysmjs committed Oct 10, 2019
1 parent f957a14 commit 99afdc1
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/app/store/config/configureStore.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { createStore } from 'redux';
import { createStore } from '~/store/config/dynoStore';

// import throttle from 'lodash.throttle';

// import all reducers
import reducer from '~/store/reducers';

import enhancer from '~/store/config/enhancer';

// import { saveState, loadState } from './storage';
Expand All @@ -14,11 +11,7 @@ import enhancer from '~/store/config/enhancer';

// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function configureStore() {
const store = createStore(
reducer,
// persistedState,
enhancer, // third parameter is called an 'enhancer'
);
const store = createStore(enhancer);
/* // Save the state any time the store state changes
store.subscribe(throttle(() => {
// Rather than pass the whole state object,
Expand Down

0 comments on commit 99afdc1

Please sign in to comment.