dependent-tan
dependent-tan14mo 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.ai14mo 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.ai14mo ago
<@1060848387936755852> kapa.ai is still learning and improving, please let us know how it did by reacting below
dependent-tan
dependent-tan14mo ago
replay is not working using json . activity suppose to retrigger
other-emerald
other-emerald14mo ago
@poklu_37583 could you elaborate more on your issue? It's not clear what you are talking about.