What is the performance overhead of automatic binding of js functions?

problem description

When

react creates components, it is recommended to use React.Component instead of React.CreateClass . The reason is that React.CreateClass will automatically bind functions, which will cause unnecessary performance overhead. React.Component can bind functions selectively.

question

1. What is the performance overhead of auto-binding functions?
2. What is the performance overhead of binding functions?

which god can explain it in depth?

Mar.02,2021

refer to for answers here

every time render encounters these writings, it will re-bind the handleClick function to this to recreate a new function
Menu