Learning on Web Dev Open is free for all.

AI-Native Products > Streaming, and designing for wrongnessCancellation, abort and the detached node
Phase 08Streaming, and designing for wrongness391 of 434

Cancellation, abort and the detached node

A stream the user has walked away from is still costing money and still writing into a component that no longer exists.

Build35 minAI implements

Build this in your own editor

This one runs on your machine rather than in the browser workbench. Work to the outcomes below, then come back and mark it complete.

You should now be able to

  • Abort an in-flight request from the client and stop billing
  • Clean up a stream on unmount and on navigation
  • Let a user stop generation and keep the partial output
Ask the community

Loading…