Type d'évaluation
Mise en situation réelle
Analyse
Intelligence Artificielle
Compétences ciblées
Scénario Technique
Context A parent component manages a shopping cart, and a child component displays individual items with a remove button. The Problem The child component has no way to notify the parent when an item should be removed, so the remove button currently has no effect. Constraints Define the removeItem handler in the parent component. Pass it as a prop to the child component. Call the function from the child's button onClick. Expected Deliverable A React parent-child component pair demonstrating upward communication via callback props, correctly updating parent state from a child action.
Prêt à évaluer ce talent ?
Accédez à l'interface de test complète pour soumettre votre architecture ou votre code.