title: ReactJS You must pass a component to the function returned by connect
body: <p>You must pass a component to the function returned by connect. 
  Instead received {"id":"-LGZkSJah62kXrfUl-6u","teamA":"England","teamB":"England"}</p>
  
  <p>So the function returned by connect is 'initAddMatchResult'. Why is it not approprite to pass the team variables?</p>
  
  <p>Hi, I am creating a React application with redux and getting the error ..You must pass a component to the function returned by connect. 
  Instead received {"id":"-LGZkSJah62kXrfUl-6u","teamA":"England","teamB":"England"}</p>
  
  <p>I have a function on my component which correctly calls </p>
  
  <pre><code>addMatchResultHandler = (id, teamAName, teamBName) =&gt; {
      this.setState({
          inputtingResult: true
      })
      this.props.onAddMatchResult( id, teamAName, teamBName);
  }
  </code></pre>
  
  <p>the action to dispatch ..</p>
  
  <pre><code>const mapDispatchToProps = dispatch =&gt; {
      return {
          onFetchUpcomingMatches: () =&gt; dispatch(actions.fetchUpcomingMatches()),
          onAddMatchResult: (matchID, teamAName, teamBName ) =&gt; dispatch(actions.initAddMatchResult(matchID, teamAName, teamBName))
      }
  }
  
  export const initAddMatchResult = ( matchID, teamAName, teamBName  ) =&gt; {
      return {
          type: actionTypes.INIT_MATCH_RESULT_INPUT,
          matchId: matchID,
          teamAName: teamAName,
          teamBName: teamBName
      };
  }
  </code></pre>
  
  <p>which correctly updates the state in the reducer. </p>
  
  <pre><code>const initAddMatchResult = ( state, action ) =&gt; {
      return updateObject( state, {
          selectedMatchForUpd: {
              matchID: action.matchId,
              teamAName: action.teamAName,
              teamBName: action.teamBName
          }
      } );
  }
  </code></pre>
  
  <p>I have confirmed in redux that selectedMatchForUpd is getting updated with the correct values.
  So why is this error being thrown? any help would be much appreciated.</p>