renderer is getting called multiple times for React.FC when it routes to a page.. any clue?
renderer is getting called multiple times for React.FC when it routes to a page.. any clue?
#MultiCallsIssue
4 Replies
Hi @poklu_37583. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
This behavior might be due to the use of
<React.StrictMode>
. In <React.StrictMode>
, React will render the components twice in development mode to identify unsafe life cycles, unexpected side effects, and legacy or deprecated APIs. It's used for highlighting possible problems. These checks are run in development mode only; they do not impact the production build.
Here is the relevant extract from the documentation (https://refine.dev/docs/faq):
This is the expected behavior if you useIf you want to avoid these multiple renders, you might consider removing<React.StrictMode>
. In this mode, React will render the components twice in development mode to identify unsafe life cycles, unexpected side effects, and legacy or deprecated APIs. It's used for highlighting possible problems.<React.StrictMode>
checks are run in development mode only; they do not impact the production build.
<React.StrictMode>
from your application. However, keep in mind that this could make it harder to spot potential issues with your components.
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------<@1060848387936755852> kapa.ai is still learning and improving, please let us know how it did by reacting below
conscious-sapphire•14mo ago
replay is not working using json . activity suppose to retrigger
conventional-tan•14mo ago
@poklu_37583 could you elaborate more on your issue? It's not clear what you are talking about.