perf(web): memoize icon components

This commit is contained in:
Paul Armstrong
2021-02-06 20:17:32 -08:00
committed by Blake Blackshear
parent 3e2506136c
commit 19bd5ace7d
10 changed files with 37 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
import { h } from 'preact';
import { memo } from 'preact/compat';
export default function Menu() {
export function Menu() {
return (
<svg className="fill-current" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none" />
@@ -8,3 +9,5 @@ export default function Menu() {
</svg>
);
}
export default memo(Menu);