Skip to content

Commit aa2863c

Browse files
committed
🤖 Remove unnecessary React.memo from AgentStatusIndicator
React Compiler automatically handles memoization, making manual React.memo() redundant. The compiler is enabled via babel-plugin-react-compiler in vite.config.ts. The component already benefits from WorkspaceStore's reference stability via useSyncExternalStore, so React.memo() provides no additional optimization. Follows precedent from commit e6b7b78 which removed unnecessary memoization from PinnedTodoList with rationale: "trust the architecture." Generated with `cmux`
1 parent f87a78e commit aa2863c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/components/AgentStatusIndicator.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface AgentStatusIndicatorProps {
1414
className?: string;
1515
}
1616

17-
const AgentStatusIndicatorInner: React.FC<AgentStatusIndicatorProps> = ({
17+
export const AgentStatusIndicator: React.FC<AgentStatusIndicatorProps> = ({
1818
workspaceId,
1919
lastReadTimestamp,
2020
onClick,
@@ -109,6 +109,3 @@ const AgentStatusIndicatorInner: React.FC<AgentStatusIndicatorProps> = ({
109109

110110
return indicator;
111111
};
112-
113-
// Memoize to prevent re-renders when props haven't changed
114-
export const AgentStatusIndicator = React.memo(AgentStatusIndicatorInner);

0 commit comments

Comments
 (0)