Making duplicate calls in the api
Using the github example (finefoods - mui), the application is making duplicate calls in the api
Does anyone have a suggestion on how to solve this problem?
![No description](https://cdn.answeroverflow.com/1031609590929969302/unknown.png)
7 Replies
Hey @pedrosilva8235 👋,
Could it be related to react strict mode?
like-gold•2y ago
if it is about the "mutate" parameter, I tested with all the options, and the same problem occurs
Can you reproduce the same issue in our Ant design example?
https://example.admin.refine.dev
Finefoods Ant Design Admin Panel - refine
Web site created using refine
like-gold•2y ago
I downloaded the updated code from github and ran it locally, for me it keeps duplicating requests
![No description](https://cdn.answeroverflow.com/1031632649195896974/unknown.png)
like-gold•2y ago
One situation that I noticed was that running the compiled application, the problem does not occur
stormy-gold•2y ago
Hi @pedrosilva8235, This situation occurs because of Strict Mode https://reactjs.org/docs/strict-mode.html
Strict Mode not running on production build. Because of that compiled application works as expected.
If you remove StrictMode component in this file this situtation will not happen again. https://github.com/pankod/refine/blob/next/examples/fineFoods/admin/mui/src/index.tsx
sensitive-blue•2y ago
Hey @pedrosilva8235 in addition to @alicanerdurmaz's explanation, you can use React Dev Tools extension on your browser to identify strict mode calls instead of disabling it. I think it's a good way to prevent bugs before happening 🚀