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?
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?
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.
upgraded dva-cli dva -v dva-cli version 0.9.2 { "private": true, "scripts": { "start": "roadhog server", "build": "roadhog build", "lint": "eslint --ext .js sr...
now it is recommended to write stateless components, so the question is, how to collect the status values in the input box and pass them to the backend? although the callback of the Form component can get the final values, it is limited to the form. ...
Q: did not return to the top of the page when switching pages under dva use window.scrollTo (0,0) in subscriptions; no effect, undefined. window can be printed backTop({ history }) { return history.listen(() => { console.log(window...