redux append to an array
case ADD_ITEM :
return {
...state,
arr: [...state.arr, action.newItem]
}
redux append to an array
case ADD_ITEM :
return {
...state,
arr: [...state.arr, action.newItem]
}
how to append a data to list in redux
case ADD_ITEM :
return {
...state,
arr: [...state.arr, action.newItem]
}
OR
case ADD_ITEM :
return {
...state,
arr: state.arr.concat(action.newItem)
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us