Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/real-donkeys-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"streamdown": patch
---

feat: memoize components to prevent child re-renders
11 changes: 11 additions & 0 deletions apps/website/app/components/memoization.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Section } from './section';

const markdown = 'TBD';

export const Memoization = () => (
<Section
description="Streamdown has block and component level memoization built in, reducing re-renders while streaming."
markdown={markdown}
title="Advanced Memoization"
/>
);
2 changes: 2 additions & 0 deletions apps/website/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Header } from './components/header';
import { Hero } from './components/hero';
import { Implementation } from './components/implementation';
import { Mathematics } from './components/mathematics';
import { Memoization } from './components/memoization';
import { MermaidDemo } from './components/mermaid';
import { Props } from './components/props';
import { Styles } from './components/styles';
Expand All @@ -31,6 +32,7 @@ const Home = () => (
<MermaidDemo />
<TerminatorParser />
<HardenedMarkdown />
<Memoization />
<Props />
<CallToAction />
<Footer />
Expand Down
Loading