Skip to content

Commit 3220eea

Browse files
waleedlatif1claude
andcommitted
fix(chat): reset chat state on identifier change via key prop
Keying `<ChatClient>` on `identifier` guarantees a full remount on route transitions between chats, so `conversationId`, `messages`, and every other piece of local state start fresh — no reset effect required. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 2f133f2 commit 3220eea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/sim/app/chat/[identifier]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export const metadata: Metadata = {
77

88
export default async function ChatPage({ params }: { params: Promise<{ identifier: string }> }) {
99
const { identifier } = await params
10-
return <ChatClient identifier={identifier} />
10+
return <ChatClient key={identifier} identifier={identifier} />
1111
}

0 commit comments

Comments
 (0)