Automattic / gridicons

The WordPress.com icon set
http://automattic.github.io/gridicons/
GNU General Public License v2.0
111 stars 13 forks source link

Fix/main gridicon component #289

Closed oandregal closed 6 years ago

oandregal commented 6 years ago

By changing the component to be a functional one in https://github.com/Automattic/gridicons/pull/283, we broke backward compatibility. That resulted in a break in icons that used the React ref to keep track of the DOM element.

This PR reverts it to a React.PureComponent.

How to test

https://github.com/Automattic/wp-calypso/pull/23306 makes use of 3.0.1-alpha.3 and is a good testbed.

blowery commented 6 years ago

Found a couple little optimizations in the proposed render method. They seem to have existed prior, so it's not really a priority to fix them here... But would we want to address it now, or in another PR?