title: redux-react error: Actions must be plain objects
body: <p>i`m learning redux and after setting all the setup i get this message: </p>
  
  <pre><code>    Error: Actions must be plain objects. Use custom middleware for async actions.
  </code></pre>
  
  <p>I readed 10 different issues with this mistake but not single solution works for me. here is my project on github, in case problem not in following code:<a href="https://github.com/CodeNinja1395/Test-task-for-inCode/tree/redux" rel="nofollow noreferrer">https://github.com/CodeNinja1395/Test-task-for-inCode/tree/redux</a></p>
  
  <p>store:</p>
  
  <pre><code>import {createStore, applyMiddleware, compose} from 'redux';
  import thunk from 'redux-thunk';
  import rootReducer from './reducers';
  
  const initialState = {};
  
  const middleware = [thunk];
  
  
  const store = createStore(
    rootReducer,
    initialState,
    applyMiddleware(thunk)
  );
  
  export default store;
  </code></pre>
  
  <p>actions:</p>
  
  <pre><code>import {FETCH_DATA} from './types';
  
  export const fetchData = () =&gt; dispatch =&gt; {
    fetch('https://raw.githubusercontent.com/CodeNinja1395/Test-task-for-inCode/master/clients.json')
      .then(posts =&gt;
        dispatch({
          type: FETCH_DATA,
          payload: posts
        })
      );
  };
  </code></pre>