Anyone with redux toolkit knowledge? The code below is causing my entire app to crash. Can anyone spot the problem in my asyncThunk because I can't...
export const getBarbers = createAsyncThunk(
"/barbers/fetchBarbers",
async () => {
return fetch("/api/barbers").then((res) => res.json());
}
);
Removing the async keyword remedies the app failure but I'm pretty sure I need that.