-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79b1691
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always nice to remove lines of code, but using an anonymous function for props in
render()
isn’t good for perf. From the jsx-no-bind eslint-plugin-react rule:Also prevents any shouldComponentUpdate shallowEquals checks from working.
79b1691
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good point. I was concerned about this when I saw the new
ref
callback pattern. What's funny is that this bad practice is used in the official example for ref callbacks.I am guilty of this in other places so I'll make a note to clean this up.