title: React native reducer: How update object value in array
body: <p>Good evening. New to react native, I am trying to change the property value of an object in contenur to an array in my reducer. I have tried several of the suggested solutions but it replaces the object in the array with the new value. help me, here is the example of my object redux array</p>
  <pre><code>[{id:'UniqueId', name, &quot;somename&quot;,type:'sometype'},{id:'UniqueId', name, &quot;somename&quot;,type:'sometype'},{id:'UniqueId', name, &quot;somename&quot;,type:'sometype'}]
  </code></pre>
  <p>now I would like to modify the value of the name property of an object contained in the array while knowing its id without touching or remove the other value of the object from the array</p>
  <p>Here is my reducer</p>
  <pre><code>const initialState = { appliance:false }
  function authReducer(state=initialState , action) {
      let nextState
      switch (action.type) {
          case 'SET_ALL':
              nextState = {
                ...state,
                appliance:action.value
            }
            return nextState || state
          case 'ADD_DATA':
            nextState = {
              ...state,
              appliance:[...state.appliance, action.value]
          }
          case 'EDIT_NAME':
            return state.map(item =&gt; 
              item.id ===  action.value ? { ...item, title, tags, mentions} : item 
             )
  
        default:
          return state
        }
    }
  
    export default authReducer
  </code></pre>