AutoFi interview question

React - component state and lifecycle