Loading video...

Video Failed to Load

Go Home

React tip: "use client" misconceptions (2/5) 🚫 "You cannot nest Server Components inside Client Components because "use client" turns everything into Client Components." ✅ We can pass the rendered result of Server Components to Client Components as props. Simple example: (Server Component) (Client Component) (Server Component) is designed for...

43,989 views • 2 years ago •via X (Twitter)

11 Comments

Delba's profile picture
Delba2 years ago

This is part of a video I'm working on, so I'm open to feedback. What was confusing? What was missing? What could be improved? Subscribe to catch it when it's out:

Luke's profile picture
Luke2 years ago

Animation and music = A+ Overall knowledge transfer = Super confused Some of the confusion I think was the pacing felt fast (which I get for this showcasing the concept). Looking forward to rewatching w/ the voiceover!

Delba's profile picture
Delba2 years ago

Fair. Thank you for the feedback. I struggled a bit with this one. You can see I had to overexplain it in the description, which is always a sign that something is not quite clicking. It will be easier with a voice-over.

Vitor Markis's profile picture
Vitor Markis2 years ago

If a client component receives a children that eventually will be a server component is correct to say that he is receiving just a html blob, and then in the browser, will create the virtual dom using this html as part of the component?

Delba's profile picture
Delba2 years ago

We can think of it as an HTML partial. But under the hood, it's transported via a special serialized format that: - includes the rendered server components - includes references to where child client component code is in the client bundle - any props passed to those client components - supports out-of-order streaming - supports merging in incoming components without blowing up the state of what's already on the screen.

Daniel Kanem's profile picture
Daniel Kanem2 years ago

Knowing how hard it is to animate these code-blocks, this is a masterpiece, Delba!

Delba's profile picture
Delba2 years ago

Appreciate it! Follow @pomber for inspiration 😊

𝗧𝗼𝗺 𝘈𝘺𝘭𝘰𝘵𝘵's profile picture
𝗧𝗼𝗺 𝘈𝘺𝘭𝘰𝘵𝘵2 years ago

I’m in love with the style and information architecture of these animations. Really useful!

Delba's profile picture
Delba2 years ago

Appreciate it you saying so, thank you!

My Calendy's profile picture
My Calendy2 years ago

Amazing insight, thanks So if I’m using @nextjs and @supabase for auth with google on the backend, then how do I extract the provider access / refresh tokens if a user signed in with their email? We need to allow users to create google calendar events from their account page.

Delba's profile picture
Delba2 years ago

Thank you! I'm not intricately aware of Supabase's auth API, but I remember them having lots of great app router docs/demos. cc @jonmeyers_io In server components/middleware/server actions/route handlers, you'd use their server-side API. In client components, you'd use their client context provider, which you can place in your root layout e.g.

Related Videos

If you’re playing on MonkeyTilt, the outcome might already be decided BEFORE you bet “The cryptography behind every bet has always been sound” We tested it It isn’t... we sent two different client seeds for the same nonce same result both times the server is ignoring the client seed entirely the player has ZERO influence on outcomes — what we did — opened the MonkeyTilt provably fair verifier with a revealed server seed entered nonce 1 → got 3.04x changed the client seed same server seed, same nonce → 3.04x changed it again → 3.04x the client seed has ZERO effect on the outcome — why this matters — in a provably fair system the outcome is derived from: -server seed -client seed -nonce the client seed exists so the player contributes randomness the server CAN’T predict if it’s ignored the server knows every outcome BEFORE you bet the hash commitment proves nothing because the server already controls all the inputs — not a frontend bug — we checked the network traffic the verifier sends a WebSocket request with: -client seed -server seed -nonce the server receives different client seeds and returns the same result anyway request 1 → client_seed “Clientseed123456789” → 3.04x request 2 → client_seed “NEWSEED12345” → 3.04x this is the server ignoring input not a display issue — live bet traffic — placing a Limbo bet returns: -random_multiplier -total_payout -round_closed that’s it no hash no seed reference no nonce no proof seeds are fetched from a separate endpoint game engine and seed system are DISCONNECTED — nonce verification — you can only verify nonces you’ve already played in a real system all outcomes are predetermined once the server seed is committed - they’re deterministic blocking future nonces suggests results don’t exist until you bet — summary — -client seed ignored by server -no cryptographic proof in bet responses -game engine and seed system DISCONNECTED -nonce verification restricted this isn’t provably fair it looks like provably fair UI on top of server side RNG MonkeyTilt should probably address this anyone can verify this themselves in 60 seconds - open the verifier, change the client seed, watch the result stay the same

CoinBets🔍

20,973 views • 4 months ago

New course: MCP: Build Rich-Context AI Apps with Anthropic. Learn to build AI apps that access tools, data, and prompts using the Model Context Protocol in this short course, created in partnership with Anthropic Anthropic and taught by Elie Schoppik Elie Schoppik, its Head of Technical Education. Connecting AI applications to external systems that bring rich context to LLM-based applications has often meant writing custom integrations for each use case. MCP is an open protocol that standardizes how LLMs access tools, data, and prompts from external sources, and simplifies how you provide context to your LLM-based applications. For example, you can provide context via third-party tools that let your LLM make API calls to search the web, access data from local docs, retrieve code from a GitHub repo, and so on. MCP, developed by Anthropic, is based on a client-server architecture that defines the communication details between an MCP client, hosted inside the AI application, and an MCP server that exposes tools, resources, and prompt templates. The server can be a subprocess launched by the client that runs locally or an independent process running remotely. In this hands-on course, you'll learn the core architecture behind MCP. You’ll create an MCP-compatible chatbot, build and deploy an MCP server, and connect the chatbot to your MCP server and other open-source servers. Here’s what you’ll do: - Understand why MCP makes AI development less fragmented and standardizes connections between AI applications and external data sources - Learn the core components of the client-server architecture of MCP and the underlying communication mechanism - Build a chatbot with custom tools for searching academic papers, and transform it into an MCP-compatible application - Build a local MCP server that exposes tools, resources, and prompt templates using FastMCP, and test it using MCP Inspector - Create an MCP client inside your chatbot to dynamically connect to your server - Connect your chatbot to reference servers built by Anthropic’s MCP team, such as filesystem, which implements filesystem operations, and fetch, which extracts contents from the web as markdown - Configure Claude Desktop to connect to your server and others, and explore how it abstracts away the low-level logic of MCP clients - Deploy your MCP server remotely and test it with the Inspector or other MCP-compatible applications - Learn about the roadmap for future MCP development, such as multi-agent architecture, MCP registry API, server discovery, authorization, and authentication MCP is an exciting and important technology that lets you build rich-context AI applications that connect to a growing ecosystem of MCP servers, with minimal integration work. Please sign up here!

Andrew Ng

142,010 views • 1 year ago

This is a standard practice for almost all Tier-1 banking applications in Nigeria, and for some fintech applications I’ve previously performed pentests on. Client-side encryption isn’t a total waste, or a waste of compute, as some people have claimed, but rather a measure to protect against API tampering or API request/response manipulation between the client and the server when implemented properly. Even with HTTPS, attackers can capture a decrypted version of web or mobile API data in transit because the browser and the server establish a level of trust during the TLS handshake. Attackers can leverage this trust to capture & proxy already-decrypted traffic, tamper with it, and then forward it to the server. This allows them to override what the user interface or client is originally supposed to send and replace it with data of their choosing. That is why validation needs to be performed on both the client and the server side. To wrap up, encrypting API requests and responses makes it significantly harder for attackers to tamper with data, even if they capture the traffic, unless they have access to the encryption details (algorithm, encryption mode, key size, secret key, and initialization vector), assuming asymmetric encryption is used. In the demo below, you can see how I discovered additional parameters (balance, is_admin) in the API response, captured the registration API request, despite it being sent over HTTPS from the interface, added the discovered parameters, and successfully inflated my balance to 50 billion and also escalated my privileges to admin, and ultimately deleted the accounts of two live users/customers. In the second slide, I captured an API traffic of a bank app, and you can see how difficult the payloads are to read.

Ghost St Badmus

217,051 views • 7 months ago

After sourcing and inspecting over 200 cars for clients and companies in the past three years, we've learned that sometimes things don't go exactly as planned. In this case, it was a Toyota Camry 2014 that we sourced for a client. During inspection, everything checked out perfectly and the A/C was cooling properly. In fact no codes on the scan report. My suspicion is that the refrigerant used before the sale wasn't of good quality, which later led to issues. After some time, the client reported that the A/C had stopped working. While in Akure, he was advised to install a manual compressor, which was not the correct solution for this vehicle. It might have been a cheaper fix in the short term, but it wasn't the standard we wanted for our client. We asked him to bring the car down to Lagos, carried out a proper diagnosis, and replaced the compressor and condenser. The repair cost us over ₦650,000, with some support from the dealer involved. At the end of the day, our reputation is worth more than the cost of any repair. We stood by our word, maintained our standards, and made sure the customer got the experience he deserved. The client is happy, the other client who recommended us isn't disappointed, and most importantly, we delivered on our promise even when the issue was beyond our control. We are accountable to ensure we deliver the best value for money when our clients trust us to source and inspect cars for them Anyways warranty plans for cars we source is coming . And it's going to change the game . Ouu. Yes Mr Moses to the rescue as well for the ac fix. No one would have done a better job than him (+2348026941215)

The mechanic

34,875 views • 1 month ago

How should you search, filter, and paginate data with Next.js? This demo has 50,000 books in a Postgres database. • Page Load: When the page loads, we see the React Suspense fallback. This loading skeleton is displayed until the first page of books is retrieved from the database. • Searching: The search input has a 200ms debounce. After 200ms of inactivity, the form submits, updating the URL state with `?q={search}`. The Server Component reads `searchParams` and queries the database. On form submission, a React transition starts, allowing us to read the pending status with `useFormStatus` to display an inline loading state. • State Preservation: Navigating to an individual book page retains the search input state. Reloading the page or sharing the link preserves the search results. • Client-side Filtering: Filtering authors in the left sidebar is done client-side. Authors are fetched by a Server Component and passed as props to the sidebar. Changing the input value updates React state and re-renders the sidebar. • Optimistic Updates: The sidebar’s selected authors are optimistically updated with `useOptimistic`. Checkbox selections update instantly without waiting for the URL to change. • State Preservation: Navigating to an individual book page retains the sidebar filter input and selected author state across navigations, giving it an app-like feel. • Pagination: Navigating between pages updates the URL state, triggering the Server Component to query the database for the specific page of books. We also fetch the total book count to show the total number of pages. This demo isn't perfect yet (still working on it) but it's been a fun playground for some of these patterns. You can imagine a similar experience for thousands of movies, cars, products, or any other very large dataset. Demo → Code →

Lee Robinson

236,712 views • 1 year ago

This Chinese developer runs 9 agents on Claude Code under a GPT-5.5 orchestrator and they close 500 client tasks a month without a single assistant. His client work is closed without him, on a single laptop and only three subscriptions. The entire system lives on one MacBook Pro M4 with 128 GB of memory and subscriptions to Claude Code and GPT-5.5 cost him approximately $300 a month. There is no CRM, no team, no office only a terminal window with 9 parallel streams. The orchestrator works with a simple system prompt: «You are the orchestrator of a client inbox. Classify every incoming email into 4 categories: code, content, analysis, communication. Delegate to the corresponding worker agent. When the result is ready, check it for completeness, send it to the client on my behalf, and mark the task as closed. Do not ask clarifying questions.» And the orchestrator checks the inbox every 30 seconds, classifies fresh emails, and distributes them to 9 worker agents on Claude Code, each of whom is responsible for their own class of tasks. Here is an example of how one of them closes a request to refactor a client's auth module: Task: refactor user-auth module Broke the monolith into 3 files by responsibilities Added unit tests, coverage increased to 87% Renamed 4 functions to camelCase according to the style guide PR is ready for review, link below» And so about 50 cycles a day. By noon 25 tasks are closed, by dinner 50, and by the end of the month 500. On average, it takes about 7 minutes from the appearance of an email in the inbox to sending the result to the client. This is more than what a live team of 6 developers, copywriters and analysts working 8 hours a day closes. This is no longer an agency. This is a workstation where an orchestrator replaces a manager, and 9 worker agents replace the staff. The pipeline goes from inbox to closing 500 times a month without human participation at any step.

Blaze

29,917 views • 2 months ago