This Week in React: Building Smarter Agents, React Server Components Demystified, DoorDash’s Big Win, and GPT-4.1 Drops
Here's what you missed in the last two weeks in the world of AI, React and RSCs
If you open this newsletter all the time, if you forward to your friends and co-workers, if it challenges you to think in new and different ways — consider subscribing.
💛 Big thanks to Convex for sponsoring this week’s issue!
Thank you to Convex for sponsoring this week's newsletter! In my opinion, it is the best database for AI apps and I am excited to partner with them! Convex is amazing because it provides a backend platform that combines database, serverless functions, and real-time subscriptions in one unified platform. It dramatically simplifies full-stack development by eliminating the need for complex infrastructure management. Check out Convex.
🏆 My Top Picks This Week
Deep Dive of React Query and how it works
Observer Pattern for State Management: React Query employs the Observer (Publisher-Subscriber) pattern, allowing components to subscribe to query state changes. When the query state updates, all subscribed components are notified, ensuring synchronized UI updates.
useQuery
Hook Mechanics: TheuseQuery
hook initializes an observer linked to a specific query. It subscribes to the query's state changes and triggers component re-renders upon updates. Data fetching is initiated based on thestaleTime
configuration, ensuring efficient data management.Role of
QueryClient
:QueryClient
acts as a centralized store for all queries within an application. It ensures that each unique query is instantiated only once, manages caching, and handles query invalidation, promoting efficient resource utilization.
Step by Step Guide to Building an AI Real Estate Agent - New Tutorial Drop with Code!
Most tutorials on AI agents either lean too hard on no-code tools or get way too complex. I created a step-by-step guide that walks you through building your own real AI Real Estate Agent — from scratch.
This agent uses open-source, free tools like Convex, OpenAI, LangGraph, and the Zillow API — all wired together in JavaScript.
Learn how to handle dynamic conversations, fetch listings, and create smart agentic behavior your users will actually find useful.
Case Study of Large Apps, featuring DoorDash -
DoorDash's homepage suffered from slow load times and poor SEO due to its CSR architecture. Transitioning to SSR aimed to enhance user experience, optimize bundle sizes, and improve SEO by delivering fully rendered content to users and search engines.
Incremental Migration Strategy: DoorDash adopted a page-by-page migration approach, focusing on critical components like above-the-fold content. They utilized a shared AppContext to ensure compatibility between SSR and CSR environments, facilitating a smooth transition without halting new feature development.
Operational Resilience Measures: The team incorporated circuit breakers and load-shedding mechanisms to handle potential SSR failures. They also established comprehensive monitoring and alerting systems to maintain service reliability during the migration process.
React for Two Computers,” - Dan Abramov’s blog post
The concept of "React for Two Computers" emphasizes viewing the server and client not as separate entities but as parts of a single program. Server Components handle data fetching and initial rendering, while Client Components manage interactivity. This division optimizes performance by reducing unnecessary data transfer and leveraging server resources effectively.
Dan contrasts HTML tags and JavaScript function calls: tags (like
<p>
) are typically nouns representing structure, while functions (likealert()
) are verbs representing actions. This distinction highlights how JSX blends declarative structure with imperative logic, allowing developers to define UI components that are both descriptive and functional.JSX enables developers to pass complex data structures as props, effectively merging the static nature of HTML with the dynamic capabilities of JavaScript. This fusion allows for more expressive and maintainable UI components, facilitating better collaboration between server-rendered content and client-side interactivity.
OpenAI's GPT-4.1, launched on April 14, 2025, introduces significant advancements in coding, instruction following, and long-context comprehension. Available exclusively through the API, the GPT-4.1 family includes three models: GPT-4.1, GPT-4.1 Mini, and GPT-4.1 Nano, each tailored for specific performance and cost needs.
Expanded Context Window: All GPT-4.1 models support a context window of up to 1 million tokens, a substantial increase from GPT-4o's 128,000-token limit, enabling more extensive data processing in a single prompt
Enhanced Coding Capabilities: GPT-4.1 achieves a 54.6% score on the SWE-bench Verified benchmark, outperforming GPT-4o by 21.4 percentage points and GPT-4.5 by 26.6 points, indicating superior performance in coding tasks.
🔥 News from me
Got questions about TanStack? Here’s your chance to ask the creator of TanStack - Tanner Linsley. Come and join the livestream on Wednesday, April 30 at 10 AM PT
🇮🇳 I am coming to India and we’re hosting a meetup on May 17! Respond back in this chat so we can hangout!
This newsletter is possible because of your support ❤️
You can offer support in multiple ways!
1. Become a Premium Subscriber: Upgrade to a paid subscription and get exclusive benefits including early access to all my e-books, open source projects and private Discord.
2. Become a GitHub Sponsor: Love the work I am doing? Consider sponsoring my work on GitHub to help me continue building useful open source tools and educational content for the community. Become a sponsor →
3. Spread the Word: Can't contribute financially? No problem at all! You can make a huge difference by sharing this newsletter with your friends.
Your support, in any form, helps me continue creating valuable content for developers worldwide. Thank you!
Not-So-Mundane Poll
Let's Connect!
Book a mentorship session: https://topmate.io/shrutikapoor08
Join our FREE community on Discord: bit.ly/shruti-discord
X / Twitter: @shrutikapoor08