Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Here's what I'm using for RSC toast. - flash() function that server actions can call - useFlash() hook on the client that gets populated by all the server-side flash invocations Works with redirects, revalidation, progressive enhancement, etc. Blog post soon!

22,637 Aufrufe • vor 1 Jahr •via X (Twitter)

11 Kommentare

Profilbild von Ryan Toronto
Ryan Torontovor 1 Jahr

It works by the server action setting a short lived cookie that's readable by js The browser uses cookie change event and when it sees a new flash cookie it'll populate state in useFlash() Browser then immediately deletes the cookie

Profilbild von Ryan Toronto
Ryan Torontovor 1 Jahr

Small update: No more cookie change event- Cookies are read in RSC and put in client component that populates context. That was missing piece to get SSR fully functional

Profilbild von Safari Web Extensions
Safari Web Extensionsvor 1 Jahr

Discover the top Safari web extensions to boost productivity, enhance workflow, and customize your browsing experience on Mac, iOS, and iPadOS.

Profilbild von Sam Selikoff
Sam Selikoffvor 1 Jahr

Awesome! Does it depend on any framework-specific features or could it theoretically be a pure React lib?

Profilbild von Ryan Toronto
Ryan Torontovor 1 Jahr

It uses cookies, so it depends on your frameworks cookie impl (ie import {cookies} form "next/headers") But maybe there's a way to make an adapter layer that hooks into all the frameworks

Profilbild von Jack
Jackvor 1 Jahr

yep been doing exact same, so easy to do it from the server

Profilbild von Zafar
Zafarvor 1 Jahr

Awesome. Thanks for sharing.

Profilbild von Seb ⚛️ ThisWeekInReact.com
Seb ⚛️ ThisWeekInReact.comvor 1 Jahr

IMHO this is the way @rwieruch Convenient to use, preserves progressive enhancement

Profilbild von pavi2410
pavi2410vor 1 Jahr

does this work similar to this?

Profilbild von zhxnrs
zhxnrsvor 1 Jahr

Just why

Profilbild von Kiran
Kiranvor 1 Jahr

But why?

Ähnliche Videos

🚨 POC for CVE-2025-55182 that works on Next.js 16.0.6 Here are the exact, battle-tested queries you need — Censys, Shodan, FOFA, ZoomEye, Quake, BinaryEdge, and Nuclei matchers — all tuned specifically to find Next.js RSC / React Server Components instances vulnerable to CVE-2025-55182 (React2Shell). ⸻ ✅ 1. SHODAN QUERY (380K+ ASSETS) Find all servers leaking RSC Server Actions: Basic Query "Vary: RSC, Next-Router-State-Tree" More Aggressive Variant http.headers.vary:"RSC" AND http.headers.vary:"Next-Router-State-Tree" Superwide Coverage "Next-Router-State-Tree" OR "x-nextjs-cache" OR "server-actions" OR "__RSC__" Focused on Vulnerable Cache Indicators "x-nextjs-cache: HIT" "Next-Router-State-Tree" ⸻ ✅ 2. CENSYS QUERY (270K+ ASSETS) (match the screenshot you posted) Exact Censys Search services.http.response.headers.vary: "RSC, Next-Router-State-Tree" Safer Multi-Matcher services.http.response.headers.vary: "RSC" AND services.http.response.headers.vary: "Next-Router-State-Tree" Detect RSC Payload Exposure (critical) services.http.response.body: "__RSC__" Detect Flight Data Leaks services.http.response.body: "server-reference-manifest" ⸻ ✅ 3. FOFA QUERY (CHINA’S OSINT GIANT) (VERY POWERFUL for RSC/Next.js) Exact Header Based header="Next-Router-State-Tree" && header="RSC" Alternative (match screenshot patterns) "Next-Router-State-Tree" && "x-nextjs-cache" For massive result count body="__RSC__" || header="server-actions" ⸻ ✅ 4. ZOOMEYE QUERY ZoomEye scans often catch Node.js apps Shodan misses. Exact Unicode-Ready Query "Next-Router-State-Tree" && "RSC" Advanced app:"Next.js" && header:"RSC" ⸻ ✅ 5. QUAKE SEARCH (360K+ MATCHES) header:"Next-Router-State-Tree" AND header:"RSC" ⸻ ✅ 6. BINARYEDGE QUERY http.response.headers.vary:"Next-Router-State-Tree" ⸻ ✅ 7. QUERY headers:"Next-Router-State-Tree" && headers:"RSC" ⸻ 🎯 8. NUCLEI MATCHER (to detect RSC without scanning payloads) If you want a nuclei detector you can plug into your scanner: matchers: - type: word part: header words: - "RSC" - "Next-Router-State-Tree" - "server-actions" - "__RSC__" ⸻ 🚩 BONUS — THE MOST ADVANCED CROSS-ENGINE QUERY Use this when you want maximum global coverage: "Next-Router-State-Tree" OR "RSC" OR "__RSC__" OR "server-actions" OR "x-nextjs-cache" OR "Next-Server-Action" This identifies: •Next.js App Router •RSC endpoints •Server Actions •Flight data APIs •Pages exposing cache HITs (required for exploitation) •Systems likely vulnerable to CVE-2025-55182 (React2Shell)

X

10,424 Aufrufe • vor 6 Monaten