How do you handle micro-frontends in React?
Instruction: Discuss the concept of micro-frontends and how React can be used to implement this architecture.
Context: This question assesses the candidate's knowledge of the micro-frontend architecture and their ability to apply React in this context, focusing on component sharing and application scalability.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
Microfrontends divide a frontend by independently owned product capabilities. The justification is usually team and release autonomy, weighed against integration, payload and operational costs. Splitting one React bundle into lazy chunks alone does not create independent deployment ownership.
I would define shell contracts for navigation, authentication context, shared design components, error handling and telemetry. Each capability needs an explicit mount/unmount lifecycle, versioned inputs/events and a rollback strategy...