Understanding the React Component Lifecycle