Domanda di colloquio di StoryXpress

How can I stop re-rendering in React everytime state gets updated.

Risposte di colloquio

Anonimo

27 lug 2019

There is component life cycle called should component Update, by default it is set to true you need to set it to false in order to stop re renderning.

1

Anonimo

12 lug 2022

You can also use useCallback/useMemo to avoid re-rendering. Depend on the requirement.