Hey guys,

Welcome to another edition of Import React by Cosden Solutions!

If you've ever built an AI agent and watched it forget what it was doing 30 seconds later, you'll like today's sponsor.

Your Agents Crave State

Every ai app hits the same wall: the agent needs to remember something, store something, try something. Ghost is postgres built for that. Spin one up per agent. Fork it. Throw it away. Pay nothing when it sits idle.

Let’s get into it.

⚡️ The Latest In React

⚛️ 3 Ways to Store Data in React (That Devs Mix Up)
Most devs default to state, but React actually gives you three different ways to store data, each with very different behavior. Regular variables don’t persist or trigger renders, state persists and updates the UI, and useRef sits in the middle. The key insight is that useRef lets you store mutable data that survives re-renders without causing one, making it perfect for things like timers, streams, or intermediate values.

🔧 React Compiler: 18 Months Later
Since React 19, the compiler has quietly changed the game by eliminating entire classes of bugs, especially around memoization. Things like useCallback/useMemo misuse are basically gone, with the compiler handling it automatically at build time. The biggest impacts have been cleaner code and fewer performance bugs by default. The catch? Many existing libraries break under stricter rules, making adoption easy for new apps but messy for older codebases.

🆕 What’s Actually New in JavaScript (2025–2026)
JavaScript is evolving faster than most devs realize, with features like iterator helpers, new Set methods, and Map.getOrInsert already shipping and simplifying everyday code. Many common patterns (manual loops, lodash helpers) are becoming built-in language features. What’s interesting is that most AI tools still generate outdated patterns, since they were trained before these changes. So unless you guide them, you’re often writing 2022 JavaScript in 2026.

🌊 How React Streams UI Out of Order
React doesn’t just stream HTML, it can send components in any order using Suspense. Fast parts (like headers/footers) render instantly, while slow ones stream in later without blocking the page. Under the hood, React sends placeholders + hidden content, then uses small scripts to swap in real components when ready. That’s how it keeps everything in the right place.

Quick Links

  • TSRX (TypeScript Render Extensions) - A new JSX alternative that lets you co-locate UI structure, logic, and styles in one place, making components easier to read (and for AI to understand). It compiles to React, Vue, Solid, and more, aiming to reduce boilerplate and fix common framework quirks at compile time.

  • RetroUI - A bold React + Tailwind UI library with neo-brutalist components and blocks designed to stand out, not look like every other SaaS.

  • Ghostty Is Leaving GitHub - Mitchell Hashimoto is moving Ghostty off GitHub after 18 years, citing constant outages and reliability issues that are actively blocking development.

  • The Unwritten Laws of Software Engineering - A collection of hard-earned lessons devs learn the painful way, like “it’s always related, roll back first” and “backups aren’t real until you’ve restored them.”

  • Claude Opus 4.7 Got More Expensive - The new tokenizer can increase costs by 12–27% for most real-world prompts, even though pricing didn’t change.

🧠 AI & General Programming

Wispr Flow works everywhere you type. Reply to Slack, update a Linear ticket, write a commit message — all by voice, without switching apps or breaking focus. System-level, zero setup. Start flowing free.

🤖 Who Actually Owns AI-Generated Code?
If you shipped code this week, some of it was probably written by AI, and legally, ownership is far murkier than most devs think. Code without “meaningful human authorship” may not be copyrightable at all, meaning you might have zero protection if it’s copied. On top of that, your employment contract likely already owns anything you build, especially if you’re using company tools. It gets riskier, AI tools can silently reproduce GPL-licensed code, potentially forcing you to open-source your entire project without realizing it.

💔 Why Your AI Agent Breaks at Scale (And the Fix)
As agents connect to more tools, they hit two issues fast: context bloat (up to 7%) and tool hallucination. More tools ≠ better performance. A new pattern called “code mode” fixes this by having the model write code to use tools instead of calling them directly, reducing tokens and avoiding confusion.

😪 The Problem With AI-Generated Code
Great engineers are “lazy” in the best way, they optimize for simplicity, abstraction, and future maintainability. But LLMs flip that, they generate code endlessly, with no incentive to simplify or clean things up. The result? Bigger systems, more duplication, and “37k lines a day” that look productive but aren’t. AI doesn’t optimize for long-term clarity, it just keeps adding.

🧩 Backend for Frontend (BFF): When It Actually Makes Sense
BFF is a simple idea, a backend tailored to a specific frontend, shaping data exactly how that UI needs it. It’s useful when apps need to combine multiple services, reduce client complexity, or ship UI-specific logic faster (especially for mobile). But it’s not a default. It adds overhead and can turn into a mini-backend if you’re not careful. In many cases, GraphQL, API gateways, or direct calls solve the same problem.

See you next week,

Darius Cosden

Keep Reading