DEV Community

Discussion on: 7 Console Methods Used by Pros

Collapse
 
mrdulin profile image
official_dulin • Edited

Do you want to know how many re-renders your React Component make? Using

const MyComponent = () => {
   // ... a lot of effects, mutate states

   console.count('MyComponent render')
   return <div>view</div>
}
Enter fullscreen mode Exit fullscreen mode