Skip to content

Instantly share code, notes, and snippets.

@MariusBongarts
Last active March 10, 2023 08:08
Show Gist options
  • Save MariusBongarts/cf672d06385ce6fd9ed240b8dc1ca099 to your computer and use it in GitHub Desktop.
Save MariusBongarts/cf672d06385ce6fd9ed240b8dc1ca099 to your computer and use it in GitHub Desktop.
import React from "react";
import { HistoryItem } from "./HistoryItem";
import { StyledList } from "./History.styled";
const MemoizedHistoryItem = React.memo(HistoryItem);
interface HistoryProps {
items: chrome.history.HistoryItem[];
}
export const History: React.FC<HistoryProps> = ({ items }) => {
return (
<StyledList>
{items.map((item) => (
<MemoizedHistoryItem key={item.id} item={item} />
))}
</StyledList>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment