Spaces:
Paused
Paused
Download components/Chat/MemoizedChatMessage.tsx from matthoffner/chatbot: direct link, hf CLI and curl.
- Browser
- Download file 261 Bytes
-
https://huggingface.co/spaces/matthoffner/chatbot/resolve/main/components/Chat/MemoizedChatMessage.tsx
- Command line
-
hf download hf://spaces/matthoffner/chatbot/components/Chat/MemoizedChatMessage.tsx
-
curl -L -o MemoizedChatMessage.tsx https://huggingface.co/spaces/matthoffner/chatbot/resolve/main/components/Chat/MemoizedChatMessage.tsx
261 Bytes
| import { FC, memo } from "react"; | |
| import { ChatMessage, Props } from "./ChatMessage"; | |
| export const MemoizedChatMessage: FC<Props> = memo( | |
| ChatMessage, | |
| (prevProps, nextProps) => ( | |
| prevProps.message.content === nextProps.message.content | |
| ) | |
| ); | |