title: What does `TypeError: Invalid attempt to spread non-iterable instance` mean, and how to fix?
body: <p>This was previously working fine, but now I'm getting the error <code>TypeError: Invalid attempt to spread non-iterable instance</code>. What does it mean by <code>spread non-iterable instance</code>? </p>
  
  <p>I'm making a call to get a list of user ids, and then running through each id to get add convos, and then adding to redux. This previously worked fine, and now is throwing the above error.</p>
  
  <pre><code>      this.props.matchUserIds.matchUserIds.matchUserIds.map(id =&gt; {
            apiHelper.getProfileInfo(token, id).then(results =&gt; {
              const match = results.data.data
              match.isBlocked = false
  
              apiHelper.getConvoByUsers(this.props.currentUser.authToken, match.user.id)
                .then(results =&gt; {
                    if(results.data.data.length &gt; 0) {
                      match.convoExists = true
                      match.convoId = results.data.data[0].id
                    } else {
                      match.convoExists = false
                    }
  
                    this.props.addMatchesProfile({matchUserProfiles: match})
    ...
  </code></pre>
  
  <p>MatchesActions.js</p>
  
  <pre><code>import {
    GET_MATCHES,
    ADD_MATCHES_PROFILES,
    RESET_MATCHES,
  } from './types'
  
  export const addMatchesProfile = ({ matchUserProfiles }) =&gt; {
    return {
      type: ADD_MATCHES_PROFILES,
      payload: { matchUserProfiles }
    }
  }
  </code></pre>
  
  <p>MatchesReducer.js</p>
  
  <pre><code>import {
    GET_MATCHES,
    ADD_MATCHES_PROFILES,
    RESET_MATCHES,
  } from '../actions/types'
  
  
  
  const INITIAL_STATE = {
    matchUserIds: {},
    matchUserIdsLoaded: false,
    matchUserProfiles: {},
  }
  
  export default (state = INITIAL_STATE, action) =&gt; {
    switch (action.type) {
      case GET_MATCHES:
        return {...state, matchUserIds: action.payload, matchUserIdsLoaded: true}
      case ADD_MATCHES_PROFILES:
        //error occurs here
        return {...state, matchUserProfiles: [...state.matchUserProfiles, action.payload]}
      case RESET_MATCHES:
        return {matchUserIds: INITIAL_STATE, matchUserProfiles: INITIAL_STATE}
      default:
        return state
    }
  }
  </code></pre>