How do you manage state in a complex React application, and when would you choose context over third-party libraries?