mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
More day 2 updates
This commit is contained in:
@@ -7,12 +7,10 @@ const store = createStore(reducer, {}, composeWithDevTools());
|
||||
|
||||
console.log(store.getState());
|
||||
|
||||
/*
|
||||
TODO: dispatch several actions and see the effect to the state inside the Redux devtool
|
||||
// TODO: dispatch several actions and see the effects on state inside the Redux devtools
|
||||
|
||||
store.dispatch(actions.???);
|
||||
store.dispatch(actions.???);
|
||||
store.dispatch(actions.???);
|
||||
*/
|
||||
// store.dispatch(actions.???);
|
||||
// store.dispatch(actions.???);
|
||||
// store.dispatch(actions.???);
|
||||
|
||||
console.log(store.getState());
|
||||
|
||||
@@ -4,16 +4,15 @@ import { actions } from '../actions';
|
||||
|
||||
describe('reducers', () => {
|
||||
it('should add items', () => {
|
||||
// 1. use Redux's createStore() to create a store with reducer as argument
|
||||
// along with the initial state
|
||||
// 1. Use Redux's createStore() to create a store. Pass in a reducer along with the initial state.
|
||||
//
|
||||
// 2. call store.dispatch() with some action messages to indicate the kind of
|
||||
// 2. Call store.dispatch() with some action messages to indicate the kind of
|
||||
// action to perform (in this case, addTodo)
|
||||
//
|
||||
// 3. assert with expect() on the resultant store.getState().todos
|
||||
// 3. Assert with expect() on the resultant store.getState().todos
|
||||
});
|
||||
|
||||
// Tests left for you to do:
|
||||
// Tests left for you to write:
|
||||
// - remove
|
||||
// - clear
|
||||
// - complete
|
||||
|
||||
Reference in New Issue
Block a user