title: Actions Must be plain objects. Use Custom middleware for async actions when I already have thunk
body: <p>I have thunk middleware applied but I am still getting impure error. I would greatly appreciate any help.</p>
  
  <p>Where I call the creator</p>
  
  <pre class="lang-js prettyprint-override"><code>import React from 'react'
  import { StyleSheet, Text, View, Button } from 'react-native'
  import { shallowEqual, useSelector, useDispatch } from 'react-redux'
  import { signIn } from '../../redux/actions/user'
  
  const LogInOrSignUpScreen = () =&gt; {
    const user = useSelector(state =&gt; state.user, shallowEqual)
  
    return (
      &lt;View&gt;
        &lt;Text&gt;Login Or Sign up&lt;/Text&gt;
        &lt;Button title='clicked' onPress={useDispatch(signIn('ok', 'dal'))} /&gt;
      &lt;/View&gt;
    )
  }
  
  export default LogInOrSignUpScreen
  </code></pre>
  
  <p>Reducer</p>
  
  <pre class="lang-js prettyprint-override"><code>export const userReducer = (state = { ...initState.user }, action) =&gt; {
    switch (action.type) {
      case SIGN_IN_ERROR:
        return state;
      // case SIGN_IN_PENDING:
      //     return state;
      case SIGN_IN_SUCCESS:
        return { ...state, ...action.data }
      default:
        //console.log(state)
        return state;
    }
  }
  </code></pre>
  
  <p>Async Action Creator:</p>
  
  <pre class="lang-js prettyprint-override"><code>export function signIn(userId, pass) {
    let creditials = { userId, pass }
    return async (dispatch) =&gt; {
      dispatch(signInPending())
      try {
        console.log('clicked')
      } catch (e) {
        console.log(e);
        dispatch(signInError());
        // return;
      }
      dispatch(signInSuccess(creditials))
    }
  }
  </code></pre>
  
  <p>Configure Store</p>
  
  <pre class="lang-js prettyprint-override"><code>import { createStore, applyMiddleware } from 'redux';
  import thunkMiddleware from 'redux-thunk'
  
  import { initialState } from './dataModel'
  import rootReducer from './reducers'
  
  export function configureStore() {
    return createStore(
      rootReducer,
      initialState,
      applyMiddleware(thunkMiddleware)
    )
  }
  
  export default configureStore;
  </code></pre>
  
  <p>App.js</p>
  
  <pre class="lang-js prettyprint-override"><code>const store = configureStore()
  
  const Stack = createStackNavigator();
  
    &lt;Provider store={store}&gt;
      &lt;NavigationContainer&gt;
        {isUserLoggedIn()}
      &lt;/NavigationContainer&gt;
    &lt;/Provider&gt;
  )
  </code></pre>
  
  <p>The text below is the fulfill the requirement of me having more filler info about the question I do apologize.</p>
  
  <p>I have thunk middleware applied but I am still getting impure error. I would greatly appreciate any help.</p>