Explain the lifecycle of a component in modern front-end frameworks and how you optimize rendering performance.