|
@@ -134,16 +134,13 @@ function reducer(state, {type, ШО, СКОКА,БАБЛО}){
|
|
|
return state
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
const store = createStore(reducer)
|
|
|
const unsubscribe2 = store.subscribe(() => console.log('подписчик 2', store.getState()))
|
|
|
const shop = store.subscribe(() => createDom(store.getState()))
|
|
|
const купиПиво = СКОКА => ({type: 'КУПИТЬ', ШО: "пиво", СКОКА})
|
|
|
const купиЧипсы = СКОКА => ({type: 'КУПИТЬ', ШО: "чипсы", СКОКА})
|
|
|
const купиСиги = СКОКА => ({type: 'КУПИТЬ', ШО: "сиги", СКОКА})
|
|
|
-const купиШото = (ШО,СКОКА) => ({type: 'КУПИТЬ', ШО, СКОКА})
|
|
|
+const купиШото = (СКОКА,ШО) => ({type: 'КУПИТЬ', ШО, СКОКА})
|
|
|
store.dispatch(купиПиво(0))
|
|
|
store.dispatch(купиЧипсы(0))
|
|
|
store.dispatch(купиСиги(0))
|