Why not replace the role of redux-thunk with asynchronous dispatch (action)?

// redux-thunk
const fetchData = (params) => (dispatch) => {
  setTimeout(() => {
    dispatch({action: "GET_DATA", payload: 111})
  })
} 
// dispatch
const fetchData = (params) => ({action: "GET_DATA", payload: 111});

setTimeout(() => {
  dispatch(fetchData(...))
})

I don"t understand the difference between the two ways.
ask the boss to give an example to illustrate. Thank you very much

Mar.04,2021

the main function of redux-thunk should not be the problem of asynchronous Synchronize. Before you use redux-thunk, you can only dispatch one action object:

dispatch({type:'DO_SOMETHING'})

and after using it, you can dispatch a function

dispatch(function (dispatch) {
    $.get('/api/somepath', function(users) {
        dispatch({
            type: 'FETCH_USERS_SUCCESS',
            users: users,
        });
    });
});

read this
https://stackoverflow.com/que.

roughly means
1, simplifies repetitive this.props.dispatch ()
2, maintains server rendering consistency
3, facilitates unit testing

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9d254-47713.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9d254-47713.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?