no-reducer
  • πŸš€Introduction
    • ☺️Demonstration
  • πŸ–₯️Installation
  • πŸ“–No-Reducer Actions
    • 🎯destination path
    • create
      • create an object/array
    • insert
      • insert to an array item
    • remove
      • remove with condition
      • remove without condition
    • replace
      • replace with condition
      • replace without condition
    • update
      • update with condition
    • append
    • clear
      • clear an array item
Powered by GitBook
On this page
  1. No-Reducer Actions
  2. update

update with condition

PreviousupdateNextappend

Last updated 2 years ago

To update an item object in an array of objects, you can write the value key of the object you want to update.

dispatch(update('DESTINATION',CONDITION-VALUE,CONDITION-KEY))

Example: Update Users with id=2

dispatch(update('Users', { name: "Crawfish Lover" }, 2, 'id'))

πŸ“–