{"ScriptPreparationCode":"// Fonction pour construire des donn\u00E9es de test\r\nfunction buildData(count) {\r\n var data = [];\r\n for (let i = 0; i \u003C count; i\u002B\u002B) {\r\n data.push(\u0060Item ${i}\u0060);\r\n }\r\n return data;\r\n}","TestCases":[{"Name":"Native","Code":"// Fonction pour mettre \u00E0 jour le DOM natif\r\nfunction updateNativeDOM(data) {\r\n const container = document.getElementById(\u0027native-container\u0027);\r\n container.innerHTML = \u0027\u0027; // Efface le contenu pr\u00E9c\u00E9dent\r\n const fragment = document.createDocumentFragment();\r\n \r\n data.forEach(item =\u003E {\r\n const div = document.createElement(\u0027div\u0027);\r\n div.className = \u0027row\u0027;\r\n const text = document.createTextNode(item);\r\n div.appendChild(text);\r\n fragment.appendChild(div);\r\n });\r\n\r\n container.appendChild(fragment);\r\n}\r\n\r\n// Donn\u00E9es de test\r\nconst data = buildData(1000);\r\n\r\n// Mise \u00E0 jour initiale\r\nupdateNativeDOM(data);","IsDeferred":false},{"Name":"React","Code":"// Composant React pour afficher la liste\r\nconst ListComponent = ({ data }) =\u003E {\r\n return React.createElement(\u0027div\u0027, { id: \u0027react-container\u0027 },\r\n data.map((item, index) =\u003E \r\n React.createElement(\u0027div\u0027, { key: index, className: \u0027row\u0027 }, item)\r\n )\r\n );\r\n};\r\n\r\n// Fonction pour mettre \u00E0 jour le DOM virtuel avec React\r\nfunction updateVirtualDOM(data) {\r\n ReactDOM.render(\r\n React.createElement(ListComponent, { data }),\r\n document.getElementById(\u0027react-container\u0027)\r\n );\r\n}\r\n\r\n// Donn\u00E9es de test\r\nconst reactData = buildData(1000);\r\n\r\n// Mise \u00E0 jour initiale\r\nupdateVirtualDOM(reactData);","IsDeferred":false}]}