How to dispatch an action, in dva with .then (() = > {})

the dva project needs to trigger an action, of Synchronize to change the query parameters on the state tree, and then get the get interface parameters in .then?

Mar.07,2021

dispatch A reducer cannot return a Promise object, so .then cannot be used.
only a dipsatch effects can return a Promise.
so if you want Synchronize, you can only write it in effects:

effects: {
    * myAyns({}, {call, put}) {
        yield put({type: 'yourReducer'});
        yield call(/*....*/);
    }
}

that's fine.

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-1bec1a5-30e2b.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-1bec1a5-30e2b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?