InterviewBuddy
All interview questions

Why should rendering be pure?

Intermediate

Answer

A render should calculate UI from inputs without changing external state. React can run, pause, or repeat render work, so side effects there can cause incorrect behavior.