How can a component remember the previous value of a prop without causing another render?
An Effect can assign the latest committed prop to ref.current. On a later render, the ref can provide the previously committed value without creating an additional state update.