Replies: 1 comment
-
是的,请求一般都是要 try catch ,可以把 另外推荐使用 react-query 或 swr 来处理 loading 态,可以避免竟态、自带 loading 态,乐观更新等。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
umijs4 请求服务端产生状态码非200时,会进入异常处理器,上层表单有 loading 开启状态,发生异常后loading状态一直开启,有没有优雅的方式进行关闭,现在是在每个提交中通过try catch 进行处理的。
Beta Was this translation helpful? Give feedback.
All reactions