Using redux-thunk returned by a function is in action. How to fix it?

export const changeSearchValue = (value: string): Function => {
 return (dispatch: Function): void => {
dispatch({
 type: CHANGE,
 payload: value
});
 Axios.get("https://www.balldontlie.io/api/v1/players", {
 params: {
 per_page: 5,
 search: value
}
})
 .then(function (response: any): void {
dispatch({
 type: SET_SUGGESTIONS,
 payload: response.data.data
})
})
 .catch(function (error: any): void {
console.log(error);
})
};
};

5e98711b61eb6333169201.png
April 19th 20 at 12:22
1 answer
April 19th 20 at 12:24
Solution
The logger should be the last middleware in the chain

Find more questions by tags ReduxReactTypeScript