Type d'évaluation
Mise en situation réelle
Analyse
Intelligence Artificielle
Compétences ciblées
Scénario Technique
Context An application has authentication state (user, token, role) that needs to be accessible across deeply nested components without prop drilling. The Problem The auth state is currently passed through 5 levels of component props, making every intermediate component unnecessarily coupled to auth logic. Constraints Create an AuthContext with useContext. Manage state transitions with useReducer (LOGIN, LOGOUT actions). Provide the context at the root level and consume it in leaf components. Expected Deliverable A React context + reducer architecture for authentication state, demonstrating clean separation between context provider, reducer logic, and consumer components.
Prêt à évaluer ce talent ?
Accédez à l'interface de test complète pour soumettre votre architecture ou votre code.