【发布时间】:2019-06-11 16:41:51
【问题描述】:
我正在使用 axios,我注意到有人去 Route A 然后快速点击一个按钮到 Route B Route A 请求仍然会运行,并且可能会发生奇怪的结果。
我正在做这样的事情
getAllTaxRates: flow(function*() {
try {
const response = yield self.rootStore().axios.get('/get');
applySnapshot(self.taxRates, response.data);
} catch (error) {
throw error;
}
}),
所以我不确定取消这些请求的最佳方法是什么。
【问题讨论】:
标签: reactjs react-router mobx mobx-state-tree