I can't understand advantage of Redux Thunk in async requests.
....
const mapDispatchToProps = (dispatch:any)=>{
return{
onStoreData: (val:number)=> push(dispatch, val),
};
};
export const push = (dispatch:any, val: number) => {
setTimeout(()=>{
dispatch(
{
type: Actions.PUSH,
val: val
}
);
}, 2000);
};
This code works without Redux Thunk even when there are many requests in the same moment. Is this code safe? What is point of Redux Thunk?