I also wanted to mention the optimization aspect of this article's refactor as well as Sergey did.
Once TabButton is wrapped in React.memo or turned into a Pure Component (as a Class Component), then it'd prevent TabButton from rendering unncessarily.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I also wanted to mention the optimization aspect of this article's refactor as well as Sergey did.
Once
TabButton
is wrapped inReact.memo
or turned into a Pure Component (as a Class Component), then it'd preventTabButton
from rendering unncessarily.