Skip to content

Commit 4d5d85a

Browse files
refactor(web): ComposerControlsBar drops its memo() wrapper
The React Compiler already caches the <ComposerControlsBar> element in ChatComposer when its props are unchanged, so the manual memo buys nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent beec3c8 commit 4d5d85a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎apps/web/src/components/chat/ComposerControlsBar.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
type ServerProvider,
2121
} from "@t3tools/contracts";
2222
import { cn } from "~/lib/utils";
23-
import { memo } from "react";
2423
import {
2524
renderProviderTraitsMenuContent,
2625
renderProviderTraitsPicker,
@@ -31,7 +30,7 @@ import type { useComposerProviderModel } from "./useComposerProviderModel";
3130
* The composer footer controls: model picker, traits, mode controls and the overflow menu for
3231
* blocks that do not fit. Rendered in the expanded footer or the resting controls host.
3332
*/
34-
export const ComposerControlsBar = memo(function ComposerControlsBar(props: {
33+
export function ComposerControlsBar(props: {
3534
environmentId: EnvironmentId;
3635
routeKind: ChatComposerProps["routeKind"];
3736
routeThreadRef: ChatComposerProps["routeThreadRef"];
@@ -328,4 +327,4 @@ export const ComposerControlsBar = memo(function ComposerControlsBar(props: {
328327
</>
329328
</>
330329
);
331-
});
330+
}

0 commit comments

Comments
 (0)