Skip to content

Commit

Permalink
Reducers
Browse files Browse the repository at this point in the history
  • Loading branch information
15Dkatz committed Oct 21, 2022
1 parent 20d5cd3 commit c49b989
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions evens-or-odds/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ import { configureStore } from '@reduxjs/toolkit';
import App from './components/App';
import './index.css';

const DEFAULT_SETTINGS = {
gameStarted: false,
instructionsExpanded: false
};

const rootReducer = () => {
return { foo: 'bar' };
return DEFAULT_SETTINGS;
};

const store = configureStore();
const store = configureStore({
reducer: rootReducer
});
console.log('store', store);
console.log('store.getState()', store.getState());

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App />);

0 comments on commit c49b989

Please sign in to comment.