In React, how do you manage complex application state, and when would you choose Context API over a state management library?