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. clear

clear an array item

Previousclear

Last updated 2 years ago

You can also use the clear action to remove an item from an array based on a specified condition, just like with other actions.

dispatch(clear('DESTINATION',CONDITION-VALUE,CONDITION-KEY));

Example: Clear Users with id = 7

dispatch(clear('Users', 7, 'id'))

πŸ“–