title: What happen with mapstatetoprops in redux?
body: <blockquote>
    <p>this file index.js</p>
  </blockquote>
  
  <pre><code>import {Provider} from 'react-redux'
  import {createStore} from 'redux'
  import rootReducers from './rootReducers'
  const store = createStore(rootReducers)
  ReactDOM.render(
    &lt;Provider store = {store}&gt;
      &lt;App /&gt;
    &lt;/Provider&gt;,
    document.getElementById('root')
  );
  </code></pre>
  
  <blockquote>
    <p>this id file rootreducers.js</p>
  </blockquote>
  
  <pre><code>const todos = [
      { id: 1, name: "Khoa" },
      { id: 2, name: "Khoai" },
      { id: 3, name: "Kha" }
    ];
    const TodoList = (state = todos, action) =&gt; {
      switch (action.type) {
        default:
          return state
      }
    };
    export default TodoList;
  
  </code></pre>
  
  <blockquote>
    <p>this is file list.js</p>
  </blockquote>
  
  <pre><code>import React, { Component } from "react";
  
  import {connect } from "react-redux";
  
  class List extends React.Component {
    render() {
      console.log(this.props.todoList);
  
    }
  };
  mapStateToProps = (state) =&gt; {
    return {
      todoList: state // err this code
    };
  };
  export default connect(mapStateToProps, null)(List);
  </code></pre>
  
  <blockquote>
    <p>i'm install react-redux and redux but when i write method mapstatetoprops it message : 'mapStateToProps' is not defined. help me.</p>
  </blockquote>