title: Delete items from state array - redux
body: <p>I'm working on react-native app with redux. I can't delete specific item from array. state.tournaments is array and item which i want to delete must contain ID which I'm sending from actions to redux.</p>
  
  <p>This is my reducer:</p>
  
  <pre><code>import {
    TOURNAMENT_NAME_CHANGED,
    TOURNAMENT_CREATE,
    SAVE_TOURNAMENT,
    DELETE_TOURNAMENT
  } from '../actions/types';
  
  const INITIAL_STATE = {
    name: null,
    admin_token: null,
    tournaments: []
  };
  
  export default (state = INITIAL_STATE, action) =&gt; {
    switch (action.type) {
      case TOURNAMENT_NAME_CHANGED:
          return { ...state, name: action.payload };
      case TOURNAMENT_CREATE:
          return { ...state, admin_token: action.payload.data.admin_token };
      case SAVE_TOURNAMENT:
          return { ...state, tournaments: [...state.tournaments, action.payload] };
      case DELETE_TOURNAMENT:
          return { ...state, tournaments: state.tournaments.filter((name, id) =&gt; id !== action.payload.id) };
      default:
        return state;
    }
  };
  </code></pre>