title: mapStateToProps() in connect() must return a plain object, Instead received Undefined
body: <p>I have implemented redux to complete a TODO application.</p>
  
  <p>My Todo code</p>
  
  <pre><code> import { connect } from "react-redux";
  
  import TodoList from "../components/TodoList.js";
  
  // Here we will connect 
  
  const mapStateToProps = state =&gt; {
      todos: state.todos
  }
  
  const mapDispatchToProps = dispatch =&gt; {
      toggleTodo: id =&gt; dispatch({ type: 'TOGGLE_TODOS', id })
  
  
  }
  
  
  export default connect(mapStateToProps, mapDispatchToProps)(TodoList);
  </code></pre>
  
  <p>// Reducer</p>
  
  <pre><code> const todos = (state = [], action) =&gt; {
      switch (action.type) {
          case 'ADD_TODO':
              return [
                  ...state, {
                      id: action.id,
                      text: action.text,
                      visibility: false
                  }
              ]
          case 'TOGGLE-TODO':
              return state.map(todo =&gt; (todo.id === action.id)
                  ?
                  { ...todo, completed: !todo.completed }
                  : todo)
          default:
              return state;
      }
  
  }
  
  export default todos;
  </code></pre>
  
  <p>Im getting an error at the end as 
  'mapStateToProps must receive a plain object, Instead received Undefined'.</p>
  
  <p>please let me know how to resolve this.</p>