So I want to understand beyond the basics of Redux thunk and I made two action creators, one of which works and uses redux thunk and other which only uses async but breaks.Below is the screenshot:
So in both action creators I await for the API request to finish and then return an action ( a JS object with type and payload).
However only the top one works and the bottom one gives an error saying action must be plain object although I return a plain object with 2 properties. I've been really struggling to understand why does the second action creator brakes and would be really nice if someone could explain in details why is it happening.Thank you!