title: Why is this react with redux code working?
body: <p><strong><code>App.js</code></strong></p>
  
  <pre><code>import React, { Component } from 'react';
  import './App.css';
  import { connect } from 'react-redux';
  import { action } from './Actions/actions'
  
  class App extends Component {
  
    onClickHandle = (type) =&gt; {
      console.log(this.props.count)
      if (type === '+') {
        this.props.inc()
      }
      else {
        this.props.dec()
      }
  
    }
  
    render() {
      console.log(this.props)
      return (
        &lt;div className="App"&gt;
          &lt;h1&gt;{this.props.count}&lt;/h1&gt;
          &lt;button onClick={() =&gt; this.onClickHandle('+')}&gt;+&lt;/button&gt;
          &lt;button onClick={() =&gt; this.onClickHandle('-')}&gt;-&lt;/button&gt;
        &lt;/div&gt;
      );
    }
  }
  
  
  const mapDispatchToProps = a =&gt; {
    return {
      inc: () =&gt; a(action.increaseCount()),
      dec: () =&gt; a(action.decreaseCount()),
    }
  }
  
  const mapStateToProps = state =&gt; {
    return {
      count: state.Counter.count
    }
  };
  export default connect(mapStateToProps, mapDispatchToProps)(App);
  </code></pre>
  
  <p>reducer.js</p>
  
  <pre><code>const initialState = {
  count: 0
  }
  const counter = (state = initialState, action) =&gt; {
      console.log(action)
      switch (action.type) {
          case 'INCREMENT':
              return {
                  count: state.count + 1
              };
          case 'DECREMENT':
              return {
                  count: state.count - 1
              };
          default:
              return state;
      }
  }
  
  export default counter; 
  </code></pre>
  
  <p>action.js</p>
  
  <pre><code>    export const action = {
      increaseCount: count =&gt; (
          {
              type: 'INCREMENT',
              payload: count
          }),
      decreaseCount: count =&gt; (
          {
              type: 'DECREMENT',
              payload: count
          })
  }
  </code></pre>
  
  <p>In this redux example I implemented an increment and decrement button and displaying the current count. I don't know why this is working, in <code>onClickHandle</code> I'm not passing current count to <code>inc()</code> or <code>dec()</code> so how these two functions knows what state I'm talking about, is store responsible for this? Please help I have already watched many tutorials but I can't understand.</p>