title: Actions must be plain object error
body: <p>I have this error: </p>
  
  <pre><code>Uncaught Error: Actions must be plain objects. Use custom middleware for async actions.
  </code></pre>
  
  <p>Although, as far as I see I'm completely on Redux Async tutorial.</p>
  
  <p><strong>My store:</strong> </p>
  
  <pre><code>import { createStore, applyMiddleware, compose } from 'redux'
  import thunkMiddleware from 'redux-thunk'
  import { createLogger } from 'redux-logger'
  import dashboardBookReducer from '../reducers/dashboardBookReducer'
  
  const loggerMiddleware = createLogger()
  
  const configureStore = (railsProps) =&gt; (
    createStore(dashboardBookReducer,
                railsProps,
                compose(applyMiddleware(thunkMiddleware, loggerMiddleware)
              )
            )
  )
  
  export default configureStore
  </code></pre>
  
  <p><strong>Action:</strong></p>
  
  <pre><code>export function fetchBooksPage (link) {
    return dispatch =&gt; {
      dispatch(requestBooksPage(link))
      return axios.get(link)
        .then(response =&gt; dispatch(receiveBooksPage(response.data)))
    }
  }
  </code></pre>
  
  <p><strong>Component:</strong></p>
  
  <pre><code>class Paginate extends Component {
    constructor (props) {
      super(props)
      this.handlePageClick = this.handlePageClick.bind(this)
    }
    handlePageClick (e, link) {
      e.preventDefault()
      const { dispatch, fetchBooksPage } = this.props
      dispatch(fetchBooksPage(link))
    } ...
  </code></pre>
  
  <p>Also strange thing: between two actions this function dispatch logger stumbles into undefined action:</p>
  
  <pre><code>action REQUEST_BOOKS_PAGE @ 19:28:45.150
  action undefined @ 19:28:45.156
  action RECEIVE_BOOKS_PAGE @ 19:28:45.194
  
   action undefined @ 19:34:34.122
  redux-logger.js?96ec:1  prev state Object {books: Array(10), employees: Object, employeesList: Array(4), booksPagination: Object, booksState: Object}
  redux-logger.js?96ec:1  action     Promise {[[PromiseStatus]]: "pending", [[PromiseValue]]: undefined}
  redux-logger.js?96ec:1  error      Error: Actions must be plain objects. Use custom middleware for async actions.
      at dispatch (eval at &lt;anonymous&gt; (webpack-bundle.self-7258924….js?body=1:1844), &lt;anonymous&gt;:158:13)
      at eval (eval at &lt;anonymous&gt; (webpack-bundle.self-7258924….js?body=1:4507), &lt;anonymous&gt;:1:7806)
      at eval (eval at &lt;anonymous&gt; (webpack-bundle.self-7258924….js?body=1:4514), &lt;anonymous&gt;:14:16)
      at Paginate.handlePageClick (eval at &lt;anonymous&gt; (webpack-bundle.self-7258924….js?body=1:1949), &lt;anonymous&gt;:45:7)
      at onClick (eval at &lt;anonymous&gt; (webpack-bundle.self-7258924….js?body=1:1949), &lt;anonymous&gt;:79:31)
      at Object.ReactErrorUtils.invokeGuardedCallback (eval at &lt;anonymous&gt; (webpack-bundle.self-7258924….js?body=1:1097), &lt;anonymous&gt;:69:16)
      at executeDispatch (eval at &lt;anonymous&gt; (webpack-bundle.self-7258924….js?body=1:1069), &lt;anonymous&gt;:85:21)
      at Object.executeDispatchesInOrder (eval at &lt;anonymous&gt; (webpack-bundle.self-7258924….js?body=1:1069), &lt;anonymous&gt;:108:5)
      at executeDispatchesAndRelease (eval at &lt;anonymous&gt; (webpack-bundle.self-7258924….js?body=1:641), &lt;anonymous&gt;:43:22)
      at executeDispatchesAndReleaseTopLevel (eval at &lt;anonymous&gt; (webpack-bundle.self-7258924….js?body=1:641), &lt;anonymous&gt;:54:10)
  redux-logger.js?96ec:1  next state Object {books: Array(10), employees: Object, employeesList: Array(4), booksPagination: Object, booksState: Object}
  </code></pre>