-1

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.

2 Answers2

1

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

amir
  • 196
  • 9
-1

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

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <>
    <App />
  </>
);
murat-es
  • 1
  • 1
  • Why do you recommend removing StrictMode? This is a developer tool to help catch bugs. It very well may be causing the double render, but why remove it? – Brian Thompson Jul 21 '22 at 21:03
  • https://stackoverflow.com/a/61897567/13627973 – murat-es Jul 21 '22 at 21:22
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 23 '22 at 00:33