Answer the question
In order to leave comments, you need to log in
REDUX. Is it possible to set one object property to (action.payload) and all others to null?
A question. Is it possible for a state redux object, when calling action. Change one field of the object in accordance with (action.payload), and set all other properties of the object to null.
For example:
case SET_VALUE_FIELD:
return {
...state,
[action.payload.field]: action.payload.value,
};
..state,
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question