Home > database >  why am i getting the same output twice in console in reactjs?
why am i getting the same output twice in console in reactjs?

Time:07-22

enter link description here

In the above image(link to image:"enter link description here") "ProductList"(a component of React project) is giving correct output and the only output should be of "ProductList" in console but i don't know why am i getting same output with "VM55" as well, and what is this "VM55".Please help me, i am stuck to this for past 20 days and this is my 3 react project where i am facing the same issue.

CodePudding user response:

You have nothing to worry about! check this

This only happens in development mode.
Please do not remove strict mode

In the future you can check with profiler tab if to component really rendered twice (or more) react profiler

CodePudding user response:

Go to index.js file and delete <React.StrictMode>

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <>
    <App />
  </>
);
  • Related