I have react app running on localhost:3000. I have created very basic application (nothing I haven't did before), but my app performance is poor.
My button contains simple transition CSS attribute and as you can see above the performance results are very slow.
button{
background: none;
color: white;
outline: none;
border: 2px solid rgb(255, 153, 0);
font-size: 20px;
padding: 5px 20px;
cursor: pointer;
width: 200px;
border-radius: 5px;
transition: 300ms all ease-in-out;
}
button:hover{
background: rgb(255, 153, 0);
}
I have tried using react performance tool chrome extension but the result are below:
Although I followed the documentation it refuses to work.
Step one: npm install react-perf-devtool
Step Two (index.js):
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
const { registerObserver } = require('react-perf-devtool');
const options = {
shouldLog: true,
port: 8080,
timeout: 12000 // Load the extension after 12 sec.
}
function callback(measures) {
console.log(measures);
}
// assign the observer to the global scope, as the GC will delete it otherwise
window.observer = registerObserver(options, callback);
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
reportWebVitals();
Also tried:
- Deleting the app
- Reinstall it
- Remove components and check if they causing the problem
- Run different app that works perfect
What can cause poor performance on so basic react application?

