Type d'évaluation
Mise en situation réelle
Analyse
Intelligence Artificielle
Compétences ciblées
Scénario Technique
Context A UI team is building a simple counter widget for a dashboard. The Problem The counter is currently implemented with vanilla JavaScript using direct DOM manipulation, which conflicts with React's rendering model. Current Code let count = 0; document.getElementById('btn').onclick = () => { count++; document.getElementById('display').innerText = count; }; Constraints Rewrite the counter as a React component using useState. Provide increment and decrement buttons. Display the current count value. Expected Deliverable A React component managing a numeric counter with useState, increment and decrement controls, and proper re-rendering on state change.
Prêt à évaluer ce talent ?
Accédez à l'interface de test complète pour soumettre votre architecture ou votre code.