Posts

Showing posts from September, 2025

Ai SDK ui - 1 - Learning AI SDK UI with Next.js

I recently started learning AI SDK UI . I’ve been working with Next.js already, but this library adds something special. It's  framework agnostic !  It works with Angular, Vue, Svelte, and React. Of course, I’m doing it with Next.js (React) because that’s what I know best. One of the first things I tried was the useChat hook. This makes building a chatbot UI feel way simpler. Normally, handling messages, updating state, and keeping track of what the AI is saying can be messy. With useChat , a lot of that heavy lifting is done for you. Here are some cool things I noticed about it: Message streaming out-of-the-box. You don't need to implement manual streaming! The hook manages states like input, messages, status, and errors. You don’t need to write all that boilerplate yourself. I also liked that it handles more than just happy paths. For example: You can stop a response midway if you want. It provides it out of the box! There are even helpers for modifying message...