Browse Source

HW11 done

Vadym Hlushko 2 years ago
parent
commit
8e5dbeea59
1 changed files with 1 additions and 4 deletions
  1. 1 4
      hw11/redux.js

+ 1 - 4
hw11/redux.js

@@ -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))