title: React-Redux | Dispatcher not working
body: <p>I have these files and somehow when I dispatch something, it always returns the default case of the reducer.</p>
  
  <p>This is the first time I'm using redux/thunk, and I'm following this tutorial: <a href="https://www.youtube.com/watch?v=nrg7zhgJd4w" rel="nofollow noreferrer">https://www.youtube.com/watch?v=nrg7zhgJd4w</a> and when he's doing it, it works.. </p>
  
  <p>Please have a look at my code :</p>
  
  <p>react component:</p>
  
  <pre><code>import React, { Component } from 'react';
  import './App.css';
  import Request from 'request';
  import { connect } from 'react-redux'
  
  import * as OperationsActions from './actions/operationsReducerActions'
  
  //import { Content, FilterSelect, ListItem, Searchbar, Sidebar} from './components/index.js'
  
  function mapStateToProps(state){
    return {
      operations : state.operations
    }
  }
  
  class App extends Component {
    constructor(props){
      super(props);   
    }
    componentDidMount(){
      this.props.dispatch( OperationsActions.getOperations() );
    }
    render() {
      console.log(this.props)
      return(
        &lt;div&gt;{this.props.operations.operations[0].text}&lt;/div&gt;
      )   
    }
  }
  
  export default connect(mapStateToProps)(App)
  </code></pre>
  
  <p>actions files :</p>
  
  <pre><code>import Request from 'request';
  
  export function getOperations(){
          Request('http://localhost:8000/client/REQUEST_OPERATIONS', (error, response, data) =&gt; {
              if(!error){
                  return {type : 'FETCH_OPERATIONS_SUCCES', payload : data};
              }
              else {
                  return {type : 'FETCH_OPERATIONS_REJECTED', payload : error}
              }
      });
  }
  </code></pre>
  
  <p>reducer:</p>
  
  <pre><code> export default function    reducer(state={
          operations : [{
              text : '',
              reqArgument : '',
              filters : [],
              url : ''
          }],
          fetching : false,
          fetched : false,
          error : null
      }, action) {
  
          switch(action.type){
              case 'FETCH_OPERATIONS':{
                  return {...state, fetching : true }
              }
              case 'FETCH_OPERATIONS_REJECTED':{
                  return {...state, fetching : false, error : action.payload}
              }
              case 'FETCH_OPERATIONS_SUCCES':{
                  return {...state, fetched : true, fetching : false, operations : action.payload }
              }
              default : {
                  return {...state}
              }
          }
      }
  </code></pre>
  
  <p>and my store:</p>
  
  <p>import { applyMiddleware, createStore } from 'redux'</p>
  
  <pre><code>    import logger from 'redux-logger'
      import thunk from 'redux-thunk'
      import promise from 'redux-promise-middleware'
  
      import reducer from './reducers'
  
      const middleware = applyMiddleware(promise, thunk, logger)
  
      export default createStore(reducer, middleware)
  </code></pre>