UI Freezing when passing prop function from parent to child component
Summary A React UI freeze caused by passing a callback from parent to child is almost always a symptom of unintended re-renders, state updates firing too often, or functions being recreated on every render. In this case, the parent component re-renders every time setmessage runs, which recreates the callback, which triggers the child to re-render, … Read more