Browse Source

memolize PageView

Yuki Takei 7 months ago
parent
commit
c663f34209
1 changed files with 2 additions and 2 deletions
  1. 2 2
      apps/app/src/components/PageView/PageView.tsx

+ 2 - 2
apps/app/src/components/PageView/PageView.tsx

@@ -40,7 +40,7 @@ type Props = {
   className?: string,
 }
 
-export const PageView = (props: Props): JSX.Element => {
+export const PageView = React.memo((props: Props): JSX.Element => {
   const renderStartTime = performance.now();
 
   const commentsContainerRef = useRef<HTMLDivElement>(null);
@@ -238,4 +238,4 @@ export const PageView = (props: Props): JSX.Element => {
 
     </PageViewLayout>
   );
-};
+});