StoryXpress interview question

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

Interview Answers

Anonymous

27 Jul 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

Anonymous

12 Jul 2022

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