RT: 经常看到在Promise
对象的then()
面前写一个unwrap()
有什么作用?
login({ username, password })
.unwrap()
.then((res) => {
})
.catch((err) => {
});
更具体的代码情况:https://github.com/reduxjs/re...
RT: 经常看到在Promise
对象的then()
面前写一个unwrap()
有什么作用?
login({ username, password })
.unwrap()
.then((res) => {
})
.catch((err) => {
});
更具体的代码情况:https://github.com/reduxjs/re...
10 回答11.2k 阅读
5 回答4.9k 阅读✓ 已解决
4 回答3.2k 阅读✓ 已解决
2 回答2.8k 阅读✓ 已解决
3 回答2.4k 阅读✓ 已解决
3 回答2.2k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
https://cn.redux.js.org/tutor...
这是redux给promise添加的一个函数