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

update

Previousreplace without conditionNextupdate with condition

Last updated 2 years ago

The difference between replace and update is the replace will remove the current object and place another object to its position. The update is just to change the attribute ( value ) based on the object's key.

Update the whole object by writing down the name of it. You can also use to point to the object you want to update.

dispatch(update('DESTINATION', {YOUR:OBJECT}))

Example: Update website of user

dispatch(update('User', { website: "crawfish.com" }))

πŸ“–
destination path