In JavaScript, a pure function relies only on args
In JavaScript, a pure function relies only on args. It references no outside state. So, it always returns the same output for a given input. Pure functions are easy to test, reuse, and understand.
In React, a pure component relies only on props. It references no outside state. So, it always returns the same output for a given input. Pure components are easy to test, reuse, and understand.