From 16db65a322ec738d77fcd50afc169bb7f9fdd182 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sun, 29 Oct 2023 12:55:16 +0100 Subject: [PATCH] perf(post): memoize post component --- src/components/post/post.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/post/post.tsx b/src/components/post/post.tsx index fc43fe4f..9cffa938 100644 --- a/src/components/post/post.tsx +++ b/src/components/post/post.tsx @@ -1,4 +1,4 @@ -import { FC, useEffect, useState } from 'react'; +import React, { FC, useEffect, useState } from 'react'; import styles from './post.module.css'; import { Link } from 'react-router-dom'; import utils from '../../lib/utils'; @@ -91,4 +91,4 @@ const Post: FC = ({ post, index, shouldExpand = true }) => { ); }; -export default Post; +export default React.memo(Post);