Skip to content

Extract useChat Hook #42

@soomtochukwu

Description

@soomtochukwu

Description

The logic managing chat messages, typing state, and sending mock responses is intertwined with the UI in page.tsx.

Requirements

  • Create src/hooks/useChat.ts.
  • Move messages, isTyping, inputState and handleSendMessage into this hook.
  • Return necessary state and handlers to be consumed by ChatInterface.tsx.

Acceptance Criteria

  • The hook successfully manages the entire chat lifecycle.
  • UI components are purely responsible for rendering the provided state.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions