React'te `reportWebVitals` kullanmak için aşağıdaki adımlar izlenebilir: 1. Web-vitals kütüphanesini kurmak. 2. `reportWebVitals.js` dosyası oluşturmak. 3. Metrikleri ölçmek: ```javascript import { getCLS, getFID, getLCP, getFCP, getTTFB } from 'web-vitals'; function reportWebVitals(onPerfEntry) { if (onPerfEntry && typeof onPerfEntry === 'function') { getCLS(onPerfEntry); getFID(onPerfEntry); getLCP(onPerfEntry); getFCP(onPerfEntry); getTTFB(onPerfEntry); } } export default reportWebVitals; ``` 4. Web Vitals'ı React'e entegre etmek: ```javascript import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import reportWebVitals from './reportWebVitals'; ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, document.getElementById('root') ); // Web Vitals'ı ölçmeye başlamak reportWebVitals(console.log); ``` Bu ayarlamayla Web Vitals verileri tarayıcı konsolunda görüntülenir. Analitik için veri göndermek (isteğe bağlı): ```javascript function sendToAnalytics(metric) { // Örnek: Google Analytics'e veri gönderme const body = JSON.stringify(metric);