MMA301_-_FA_2024_-_FE_2972.webp
Mahito95

MMA301_-_FA_2024_-_FE_2972.webp

  • Media owner Mahito95
  • Ngày thêm
Given the following Redux reducer and action in a React Native application, what will be the value of the state after dispatching the increment action?
// Reducer
const counterReducer = (state = { count: 0}, action) => {
switch (action.type) { case 'INCREMENT":
return {...state, count: state.count + 1};
default:
return state;
}
};
// Action
const increment = () => ({ type: 'INCREMENT' });
A. {count: 0}
B. { count: 1}
C. {count: 2}
D. {count:-1}

26

Thông tin

Category
MMA301
Thêm bởi
Mahito95
Ngày thêm
Lượt xem
3,773
Lượt bình luận
19
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
MMA301_-_FA_2024_-_FE_2972.webp
File size
213.2 KB
Dimensions
1920px x 1012px

Share this media

Back
Bên trên Bottom