You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Here’s why: every time the parent component renders, a new function is created and passed to the input.
* If the input was a React component, this would automatically trigger it to re-render, regardless of whether its other props have actually changed.
* Reconciliation is the most expensive part of React. Don’t make it harder than it needs to be! Plus, passing a class method is easier to read, debug, and change.