Purify Glyph component
Summary: A significant proportion of CPU time when doing a target selection in the layout plugin, was spent rendering Glyphs. They shouldn't really be doing anything expensive in render, but since they already are, this will make sure they don't re-render unnecessarily. Reviewed By: passy Differential Revision: D17906723 fbshipit-source-id: ece143f65fd46d8582e21455732049368f301186
This commit is contained in:
committed by
Facebook Github Bot
parent
874e590b96
commit
4a8a4aabb6
@@ -81,7 +81,7 @@ ColoredIcon.contextTypes = {
|
|||||||
glyphColor: PropTypes.string,
|
glyphColor: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class Glyph extends React.Component<{
|
export default class Glyph extends React.PureComponent<{
|
||||||
name: string;
|
name: string;
|
||||||
size?: IconSize;
|
size?: IconSize;
|
||||||
variant?: 'filled' | 'outline';
|
variant?: 'filled' | 'outline';
|
||||||
|
|||||||
Reference in New Issue
Block a user