Menu

How I Design React UI for LLM Features That Feel Fast and Honest - By Gopi Gugan
πŸ“°

How I Design React UI for LLM Features That Feel Fast and Honest - By Gopi Gugan

DEV Community: reactΒ·Gopi GuganΒ·5 days ago
#nhCpeBqG
#devtoreact#devto#dev#users#model
Long article (661 words) β€” no AI summary yet.
Reading 0:00
15s threshold

I'm Gopi Gugan, a software engineer building AI features with FastAPI, Postgres/pgvector, and React/TypeScript. I recently shipped an LLM feature where the model was fine β€” but the UI made it feel slow, unreliable, and hard to trust. The fix wasn't a better prompt. It was better UX. You can find more of my writing at gopigugan.ca .

Here's how I design React interfaces for LLM features so they feel fast and honest, even when the model is slow or uncertain.

Stream, don't wait

The single biggest UX win is streaming. Nobody wants to stare at a spinner for 20 seconds while a model thinks.

Use server-sent events or a streaming fetch from your FastAPI backend and render tokens as they arrive.

Show the first token fast, even if the full answer takes a while β€” perceived speed matters more than total time.

Keep a visible "generating" state with a stop button. Users should always be able to interrupt.

const res = await fetch ( "/api/chat" , { method : "POST" , body : JSON .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.