mirror of
https://github.com/plebbit/seedit.git
synced 2026-06-12 10:06:05 -04:00
perf(post): memoize post component
This commit is contained in:
@@ -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<PostProps> = ({ post, index, shouldExpand = true }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default Post;
|
||||
export default React.memo(Post);
|
||||
|
||||
Reference in New Issue
Block a user