What is a pure function and why does React expect components to be pure?
Component Patterns
Audio flashcard · 0:12Nortren·
What is a pure function and why does React expect components to be pure?
0:12
A pure function always returns the same output for the same input and has no side effects. React expects components to be pure during rendering so it can safely re-run them, skip updates, and enable concurrent features without causing bugs.
---