Last updated 1 year ago
To replace an item object in an array of objects, you can write the value key of the object you want to replace.
dispatch(replace('DESTINATION',CONDITION-VALUE,CONDITION-KEY))
Example: Replace User with id = 1 in Users
id = 1
Users
dispatch(replace('Users', { name: "Crawfish" }, 1, 'id'))