State Management · Junior · Question 7 of 75

Should you store fullName in state if you already have firstName and lastName?

Explanation

Redundant state leads to desynchronization and extra renders. Anything derivable from props and existing state is computed during render. If the computation is expensive, wrap it in useMemo.

Further reading

Problem with a question

State Management · Junior · question 7

Test yourself

Take the State Management · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz