The error is simply asking you to insert a Middleware in between which would help to handle async operations.
You could do that by :
npm i redux-thunk
Inside index.js
import thunk from "redux-thunk"
...createStore(rootReducers, applyMiddleware(thunk));
Now, async operations will work inside your functions.