MMA301_-_SU_2024_-_FE_2248.webp
T

MMA301_-_SU_2024_-_FE_2248.webp

(Choose 1 answer)
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}
FUO
5

Thông tin

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

Image metadata

Filename
MMA301_-_SU_2024_-_FE_2248.webp
File size
213.1 KB
Dimensions
1920px x 892px

Share this media

Back
Bên trên Bottom