Vadym Hlushko 2 gadi atpakaļ
vecāks
revīzija
8e5dbeea59
1 mainītis faili ar 1 papildinājumiem un 4 dzēšanām
  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))