diff options
author | eug-vs <eug-vs@keemail.me> | 2020-08-10 00:49:49 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-08-10 00:50:03 +0300 |
commit | 08e9e3abb9830b6c46f46aacb6a40ba32c4c665f (patch) | |
tree | 71fabfcb08a857cc474e9635ea441d655ed25144 /src/components/ScrollTopArrow | |
parent | 7ba15a22d1bd57e7c26ff2d5fccf5505aaf8619e (diff) | |
download | which-ui-08e9e3abb9830b6c46f46aacb6a40ba32c4c665f.tar.gz |
feat: memoize static components
Diffstat (limited to 'src/components/ScrollTopArrow')
-rw-r--r-- | src/components/ScrollTopArrow/ScrollTopArrow.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/ScrollTopArrow/ScrollTopArrow.tsx b/src/components/ScrollTopArrow/ScrollTopArrow.tsx index 08b8591..8a5bb8f 100644 --- a/src/components/ScrollTopArrow/ScrollTopArrow.tsx +++ b/src/components/ScrollTopArrow/ScrollTopArrow.tsx @@ -23,7 +23,7 @@ const useStyles = makeStyles(theme => ({ } })); -const ScrollTopArrow: React.FC = () => { +const ScrollTopArrow: React.FC = React.memo(() => { const [showScroll, setShowScroll] = useState(false); const theme = useTheme(); const classes = useStyles(); @@ -52,6 +52,6 @@ const ScrollTopArrow: React.FC = () => { } </div> ); -}; +}); export default ScrollTopArrow; |