英文:
Remix multiple form submissions
问题
我有一个表单,多次提交后,在网络选项卡中看到已取消的请求,但仍在操作函数中收到它们。我是否漏掉了什么?这是否是正确的行为?
英文:
I have a form that upon submitting multiple times, I see in the network tab the cancelled requests. but I still receive them in the action function.
Am I missing something? Is this the right behavior?
答案1
得分: 1
当一个fetch
请求(Remix在底层使用)被中止时,它只是取消了响应的处理。它不会阻止服务器处理该请求。您应确保您的服务器能够处理多个发送的请求。
英文:
Yes, when a fetch
request (which Remix uses under the hood) is aborted, it simply cancels the processing of the response. It does not stop the server from processing that request. You should make sure your server can handle multiple requests being sent.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论