other-emerald
other-emerald2y ago

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
kapa.ai
kapa.ai2y ago
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 use <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.
If you want to avoid these multiple renders, you might consider removing <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: ----------------------
kapa.ai
kapa.ai2y ago
<@1060848387936755852> kapa.ai is still learning and improving, please let us know how it did by reacting below
other-emerald
other-emeraldOP2y ago
replay is not working using json . activity suppose to retrigger
reduced-jade
reduced-jade2y ago
@poklu_37583 could you elaborate more on your issue? It's not clear what you are talking about.

Did you find this page helpful?