Загрузка видео...

Не удалось загрузить видео

На главную

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 просмотров • 1 год назад •via X (Twitter)

Комментарии: 11

Фото профиля Ryan Toronto
Ryan Toronto1 год назад

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

Фото профиля Ryan Toronto
Ryan Toronto1 год назад

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

Фото профиля Safari Web Extensions
Safari Web Extensions1 год назад

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

Фото профиля Sam Selikoff
Sam Selikoff1 год назад

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

Фото профиля Ryan Toronto
Ryan Toronto1 год назад

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

Фото профиля Jack
Jack1 год назад

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

Фото профиля Zafar
Zafar1 год назад

Awesome. Thanks for sharing.

Фото профиля Seb ⚛️ ThisWeekInReact.com
Seb ⚛️ ThisWeekInReact.com1 год назад

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

Фото профиля pavi2410
pavi24101 год назад

does this work similar to this?

Фото профиля zhxnrs
zhxnrs1 год назад

Just why

Фото профиля Kiran
Kiran1 год назад

But why?

Похожие видео

🚨 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 просмотров • 6 месяцев назад