jhamlet / svg-react-loader

Webpack SVG to React Component Loader
MIT License
559 stars 82 forks source link

Add memoization #116

Open Finesse opened 5 years ago

Finesse commented 5 years ago

This is a feature request

One of the biggest optimizations of a React application I've ever made was memoizing the SVG icon components using React.PureComponent or React.memo. It would be great if the loader emits memoized icon components.

As the loader supports React 15.6.1, the best way to implement the memoization is to use React.PureComponent.